GNOME Bugzilla – Bug 610812
Tagging a none indexed file fails silently
Last modified: 2010-03-04 17:45:45 UTC
Steps to reproduce: # This file hasn't been indexed by tracker tracker-tag -a test ~/library/books/fresh/some.djvu Tag was added successfully tracker-info ~/library/books/fresh/some.djvu Querying information for entity:'/home/lex/library/books/fresh/some.djvu' Results: 0 tracker-tag -st test Tag: 1 (shown by name) test urn:uuid:eea72e1b-34f5-9d6e-a844-b9d823ad0fbd 0 files # This url is the nao:Tag object, so it is creating the nao:Tag but not linking it with the actual file
Created attachment 154587 [details] [review] This should resolve the issue.
The patch creates stub FileDataObject resources if the file is unknown to tracker (and possibly doesn't exist). I"d have expected it to print an error message. Which approach should we pursue here?
We can check if file exist before adding the FileDataObject stub insert, and print an error if file[s] dosn't exist. About creating the FileDataObject stub i'm not sure on wich metadata add here, possibly if the file isn't yet in the store can be useful to get metadata from that.
It should be an error instead of a mock FileDataObject: 1. If the user did a typo writing it should fail, not set the tag to a wrong URI 2. We cannot detect the typo, because we cannot rely on the real existence of the file. tracker-tag can tag also "virtual" resources as a Contact. So the only solution is to fail if the URL doesn't exist in tracker already.
tagging "virtual" resources are in the scope of tracker-tag? Looking in the code it seem it's more file oriented. How a user can know the urn of a virtual resource for tag it?
(In reply to comment #5) > tagging "virtual" resources are in the scope of tracker-tag? > Looking in the code it seem it's more file oriented. Historical reasons. Originally tracker was file-oriented. Now it is "resource-oriented" and well, maybe the tool are not completely up-to-date > How a user can know the urn of a virtual resource for tag it? Using tracker-info or tagging "http://www.nokia.com" ... he is a non-basic user if is messing things in the terminal.
This has been fixed in commit c77476694be9d22510bda3b9ff62d91230382929, now in master. Now tracker-tag will do a report for each of the passed files in both --add and --delete.