On Wed, 2006-04-19 at 11:14 +0200, Dirk Meyer wrote:
> Besides the bug in the error message, why can't beacon find the media?
> The media support (different root dirs on different media like cd) is
> not integrated yet and you should always find the media (normal hd).

I honestly couldn't tell you why.  I hope that's a rhetorical
question. :)  Everything under /home/tack/tv is quite straightforward;
there are no symlinks to confuse beacon. :)

> Yes, if the name is empty we are at the root node and search with
> on which media the root node is mounted. Since you are in your tv dir,
> why is name empty?

Again, hopefully rhetorical.  I dunno. :)

> | i = self._db.query(type=type, id=id)[0]
> | # now we need a parent
> | if i['name'] == '':
> |     # root node found, find correct mountpoint
> |     for m in self._mountpoints:
> |         if m.id == i['parent']:
> |             break
> |     else:
> |         raise AttributeError('bad media %s' % str(i['parent']))
> |     return create_dir(i, m)
> 
> The question here is what is the result of the kaa.db query and why
> has it no name set?

That I can tell you.  I added a print after the first line
(self._db.query()).

QUERY: type=dir, id=13, result= {'type': u'dir', 'name': 'buffy', 'parent': 
(u'dir', 9), 'overlay': False, 'media': 'directory', 'parent_type': 1, 
'parent_id': 9, 'mtime': 1142731413, 'id': 13}
QUERY: type=dir, id=9, result= {'type': u'dir', 'name': '', 'parent': (u'dir', 
8), 'overlay': False, 'media': 'directory', 'parent_type': 1, 'parent_id': 8, 
'mtime': 1145412169, 'id': 9}
Traceback (most recent call last):
  File "/usr/bin/beacon", line 147, in ?
    result = kaa.beacon.query(**query)
  File "/usr/lib/python2.4/site-packages/kaa/beacon/__init__.py", line 77, in 
query
    return _client.query(**args)
  File "/usr/lib/python2.4/site-packages/kaa/beacon/client.py", line 138, in 
query
    result = Query(self, **query)
  File "/usr/lib/python2.4/site-packages/kaa/beacon/query.py", line 61, in 
__init__
    self.result = self._client.database.query(**query)
  File "/usr/lib/python2.4/site-packages/kaa/beacon/db.py", line 405, in query
    parent = self._query_id(pid, cache)
  File "/usr/lib/python2.4/site-packages/kaa/beacon/db.py", line 338, in 
_query_id
    parent = self._query_id(pid)
  File "/usr/lib/python2.4/site-packages/kaa/beacon/db.py", line 330, in 
_query_id
    raise AttributeError('bad media %s' % str(i['parent']))
AttributeError: bad media (u'dir', 8)

sqlite> select name,id from objects_dir where id in (13,8,9);
tv|8
|9
buffy|13

Indeed, 9 is empty.  Why, I have no idea.  But it looks like beacon has
added a phantom parent in there:

/ -> home -> tack -> tv -> (EMPTY) -> buffy

I'll see if I can figure out why when I get home.   Unless you have any
ideas.  But the directory structure under /home/tack/tv is quite
straightforward, with no symlinks at all.

Ah, but note, if I delete ~/.beacon and run:

   BEACON_MONITOR=/home/tack/tv beacon --start

Then the query that before failed now works fine.  So there's something
about my having previously attempted to index /data/movies that is
causing this problem.  Possibly due to the failure indexing /data/movies
it has left some cruft in the tables that is confusing matters.  If so,
aside from the original bug, that's a bug too. :)

> Not lots of bugs, but small stuff that doesn't match my testing cases
> like your softlinks for example. 

I'm sure there are stranger configurations than mine. :)

Jason.



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to