GNOME Bugzilla – Bug 747374
ui - files not found at symlinked /usr directory
Last modified: 2016-05-05 18:14:07 UTC
Hello, I forward this bug from Debian (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755472): [quote] Dear Maintainer, When launching shotwell, it (very briefly) displays an error dialog complaining about not being able to find tag_sidebar_context.ui. What is interesting is that it is looking for it in /media/data/usr/bin/ui — I have my /usr directory symlinked to /media/data/usr, which, I think is the root of the problem. It seems the directory the ui files should live in is wrongly computed when the /usr directory is not where shotwell expects it. I have not tried to move the /usr directory back where it belongs, since that is not feasible in my current configuration, so it may also be a more general problem. [/quote] I think the prob is that shotwell looks at /media/data/usr/bin/ui instead of /media/data/usr/share/shotwell/ui, Or shotwell should not follow the symlink. CU Jörg
*** Bug 760466 has been marked as a duplicate of this bug. ***
Probably caused by https://git.gnome.org/browse/shotwell/tree/src/util/system.vala#n13
Issue is actually: File exec_file = File.new_for_path(Posix.realpath(Environment.find_program_in_path(arg0))); exec_dir = exec_file.get_parent() and then get_sys_install_dir returns null because it resolves the symlink, making shotwell think it runs uninstalled
Digging a bit, this is a fix for a fix that was supposed to fix running shotwell from symlinked directories -.-
Created attachment 327318 [details] [review] Rework in-tree logic Instead of doing prefix magic, check whether there is a directory called "ui" next to the executable and assume we run in-tree. Signed-off-by: Jens Georg <mail@jensge.org>
That's fixed things for me - thanks.
Attachment 327318 [details] pushed as 5f60d0e - Rework in-tree logic