[Digikam-devel] [Bug 109820] Offer: Utility script to export tag information of images into the filesystem

krienke at uni-koblenz.de krienke at uni-koblenz.de
Mon Aug 7 10:29:04 BST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=109820         




------- Additional Comments From krienke uni-koblenz de  2006-08-07 11:29 -------
Am Samstag, 5. August 2006 05:16 schrieb Mats Ahlgren:

> I did a quick test of the script.
>
> 1) suggestion: Amendment to help:
>   -A <arDir>   [add: "Alternative to -l."] Create selfcontained...
> ["root and arDir have to be on the *same* filesystem!" -- I don't
> understand what you mean]


I changed the help text a little. If this is not ok, then please explain 
exactly what is unclear for you?

>
> 2) In regular mode, moving the linktree folder still destroys the symlinks;
> why not just make them hardlinks in regular mode?


Well symbolic links can go across different filesystems. So your linktree does 
not have to be on the same filesystem as digikams root directory. This is 
more flexible and this is the way I use the script myself.

> By the way, I still don't understand why you're using hard links rather
> than symlinks in Archive Mode? It defeats the purpose of my original
> suggestion for an -A option, which was to send tarballs to friends via
> email. (One might as well just ignore the Photo directory and make the
> linktree out of hardlinks, but that creates a problem where the archive
> size can potentially be up to T times larger than necessary, where T = the
> number of tags, perhaps 100.) I'm just abit confused why you implemented an
> Archive option if not for sending tarballs... If there's a problem with
> symlinks...


Well I used hardlinks because this offers best flexibility for the purpose you 
wanted it for. Using hardlinks in the Linktree pointing to the Photo 
directory you can tar the whole archive directory (containing Phots and Links 
subdirs) and send it to a friend. This does work. Compared to symbolic links 
your friend can then even move the linktree directory out of the archive 
directory and things will still work.

In the current version I changed the default to symlinks  (I personally prefer 
them too) but added an Option -H if you want to use hardlinks instead. So now 
you are free to choose. 

>
> > The problems I described were problems that arise when creating the photo
> > linktree structure
>
> ... then I'm still confused as to what it is, if you'd be so kind as to
> elucidate.


Say digikams root directory is on /home/krienke/digikam and say I wand to 
create an archive (using -A ...) on /var/tmp/krienke. Moreover /home shall  
physically be stored on disk /dev/hda2 and /var/tmp shall be on /dev/hda3. 
So /home/* and /var/tmp/* are now on different filesystems. In this situation 
calling 
digitaglinktree -r /home/krienke/digikam -d /home/krienke/digikam/digikam.db -A /var/tmp/krienke

will fail, because the script will try to *hard* link files 
from /var/tmp/krienke/Photos/*  to /home/krienke/digikam/*. But since both 
directories are on different filesystems and hardlinks cannot go across 
filesystem borders the link system call will fail.  Thats why I said that 
when creating the link structure the root directory of digikam as well as the 
archive directory have to be on the very same filesystem!


In the current version to be downloaded under 

http://www.uni-koblenz.de/~krienke/digitaglinktree/ 

I changed the default behaviour for -A in that the photodirectory containing 
hard links to photos in digikams root directory will contain only photos that 
have tags set. If you for whatever reason want this photodirectory to contain 
links to all photos in digikams root directory you can set option -C.  

Rainer



More information about the Digikam-devel mailing list