Red Hat Bugzilla – Bug 1507661
Last modified: 2018-05-17 10:39:45 EDT
Description of problem:
matej@mitmanek: ~$ gdbus-codegen --help
Traceback (most recent call last):
File "/bin/gdbus-codegen", line 41, in <module>
from codegen import codegen_main
ImportError: No module named codegen
Version-Release number of selected component (if applicable):
The problem lies in the /bin/gdbus-codegen script itself:
elif os.path.basename(filedir) == 'bin':
# Make the prefix containing gdbus-codegen 'relocatable' at runtime by
# adding /some/prefix/bin/../share/glib-2.0 to the python path
path = os.path.join(filedir, '..', 'share', 'glib-2.0')
must fail to do The Right Thing™ when it is in /bin/ instead of /usr/bin/ as apparently expected.
Created attachment 1345637 [details]
Thanks for the bug report and patch! I did a quick annotate on git upstream and
Let's backport that instead?
(In reply to Colin Walters from comment #3)
> Thanks for the bug report and patch! I did a quick annotate on git upstream
> and saw:
> Let's backport that instead?
Sounds a way better. That algorithm of looking for the proper dir with libraries is in my opinion too brittle, and after all when building the package we know where all those files will go.
We actually need https://bugzilla.gnome.org/show_bug.cgi?id=789723 too.
Not going to go through the hoops to get a pm_ack for this, it should be fixed in the current build, please reopen/comment/send smoke signal it still doesn't work or there are any other issues. Thanks!
Note the same issue appeared in bug 1485853 on the Fedora side.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.