After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747374 - ui - files not found at symlinked /usr directory
ui - files not found at symlinked /usr directory
Status: RESOLVED FIXED
Product: shotwell
Classification: Other
Component: general
0.22.x
Other Linux
: Normal critical
: 0.24
Assigned To: Shotwell Maintainers
Shotwell Maintainers
: 760466 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-04-05 15:18 UTC by Joerg C. Frings-Fuerst
Modified: 2016-05-05 18:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Rework in-tree logic (1.50 KB, patch)
2016-05-04 20:27 UTC, Jens Georg
committed Details | Review

Description Joerg C. Frings-Fuerst 2015-04-05 15:18:27 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
Comment 1 Jens Georg 2016-04-23 20:12:10 UTC
*** Bug 760466 has been marked as a duplicate of this bug. ***
Comment 2 Jens Georg 2016-04-28 16:10:01 UTC
Probably caused by https://git.gnome.org/browse/shotwell/tree/src/util/system.vala#n13
Comment 3 Jens Georg 2016-05-04 19:42:44 UTC
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
Comment 4 Jens Georg 2016-05-04 19:54:15 UTC
Digging a bit, this is a fix for a fix that was supposed to fix running shotwell from symlinked directories -.-
Comment 5 Jens Georg 2016-05-04 20:27:45 UTC
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>
Comment 6 john.frankish@outlook.com 2016-05-05 09:14:02 UTC
That's fixed things for me - thanks.
Comment 7 Jens Georg 2016-05-05 18:14:02 UTC
Attachment 327318 [details] pushed as 5f60d0e - Rework in-tree logic