Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 194343
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Linux Gnome Desktop Team <gnome@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: SpanKY <vapier@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
pygtk-2.12.1-install-codegen-to-usr-lib.patch patch to install codegen into /usr/lib/python-2.x/site-packages patch Arun Raghavan 2008-04-14 16:14 0000 1.58 KB Details | Diff
patch patch to install codegen into /usr/lib/python-2.x/site-packages patch Rémi Cardona 2008-05-28 10:12 0000 1.21 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 194343 depends on: Show dependency tree
Bug 194343 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-10-01 06:40 0000
it is a FHS violation for non-portable binary files to be stored in /usr/share/

dev-python/pygtk sticks .pyc/.pyo files in there which causes problems
obviously when upgrading python versions

$ /usr/share/pygtk/2.0/codegen/ -v
dev-python/pygtk-2.12.0 (/usr/share/pygtk/2.0/codegen)
$ ls /usr/share/pygtk/2.0/codegen/*.pyc
/usr/share/pygtk/2.0/codegen/argtypes.pyc    
/usr/share/pygtk/2.0/codegen/docextract.pyc 
/usr/share/pygtk/2.0/codegen/mkskel.pyc
/usr/share/pygtk/2.0/codegen/codegen.pyc     
/usr/share/pygtk/2.0/codegen/docgen.pyc     
/usr/share/pygtk/2.0/codegen/override.pyc
/usr/share/pygtk/2.0/codegen/createdefs.pyc  
/usr/share/pygtk/2.0/codegen/h2def.pyc      
/usr/share/pygtk/2.0/codegen/reversewrapper.pyc
/usr/share/pygtk/2.0/codegen/definitions.pyc 
/usr/share/pygtk/2.0/codegen/__init__.pyc   
/usr/share/pygtk/2.0/codegen/scmexpr.pyc
/usr/share/pygtk/2.0/codegen/defsparser.pyc  
/usr/share/pygtk/2.0/codegen/mergedefs.pyc

------- Comment #1 From Gilles Dartiguelongue 2008-04-14 10:10:47 0000 -------
*** Bug 217591 has been marked as a duplicate of this bug. ***

------- Comment #2 From Arun Raghavan 2008-04-14 16:14:21 0000 -------
Created an attachment (id=149701) [details]
patch to install codegen into /usr/lib/python-2.x/site-packages

------- Comment #3 From Rémi Cardona 2008-04-14 17:34:58 0000 -------
Patch looks good, but I don't really see the point of :

pkgpythondir = $(pyexecdir)/gtk-2.0
codegendir = $(pkgpythondir)/codegen

Why not do :

codegendir = $(pyexecdir)/gtk-2.0/codegen

...unless "pkgpythondir" is reused someplace... Am I missing something?

Patch should be sent upstream too imho :) Great stuff

------- Comment #4 From Rémi Cardona 2008-04-14 17:36:24 0000 -------
(In reply to comment #3)
> Patch should be sent upstream too imho :) Great stuff

/me should have checked his inbox thoroughly before writing dumb comments :p

------- Comment #5 From Arun Raghavan 2008-04-14 19:48:46 0000 -------
(In reply to comment #3)
> Patch looks good, but I don't really see the point of :
> 
> pkgpythondir = $(pyexecdir)/gtk-2.0
> codegendir = $(pkgpythondir)/codegen
> 
> Why not do :
> 
> codegendir = $(pyexecdir)/gtk-2.0/codegen

I just copied the way upstream did it for other stuff, though I do take your
point. And the set of functions exported by the python m4 macros just added to
the confusion, till I found the documentation.

------- Comment #6 From Arun Raghavan 2008-04-14 19:53:38 0000 -------
(In reply to comment #5)
> I just copied the way upstream did it for other stuff, though I do take your
> point. And the set of functions exported by the python m4 macros just added to
> the confusion, till I found the documentation.

To reiterate aforementioned confusion -- I reviewed the patch again, and I
believe pkgpythondir is used by the codegen_PYTHON line below in the same
file to determine where all those .py files are sent.

------- Comment #7 From Rémi Cardona 2008-05-28 10:12:32 0000 -------
Created an attachment (id=154565) [details]
patch to install codegen into /usr/lib/python-2.x/site-packages

Simpler patch, should be safer imho.

------- Comment #8 From Rémi Cardona 2008-05-28 14:04:26 0000 -------
I've just committed my patch to portage on pygtk-2.12.1-r1.

Closing

------- Comment #9 From Mikael Magnusson 2008-05-28 20:11:35 0000 -------
After i installed the new revision i got this error while building the gimp:
/usr/bin/python: can't open file
'/lib/python2.5/site-packages/gtk-2.0/codegen/codegen.py': [Errno 2] No such
file or directory

Which is probably due to the fact that /usr/bin/pygtk-codegen-2.0 looks like
this:

#!/bin/sh

prefix=/usr
datarootdir=${prefix}/share
datadir=/usr/share
codegendir=${exec_prefix}/lib/python2.5/site-packages/gtk-2.0/codegen

PYTHONPATH=$codegendir
export PYTHONPATH

exec /usr/bin/python $codegendir/codegen.py "$@"



Note that exec_prefix isn't set anywhere...

------- Comment #10 From Daniel Gryniewicz 2008-05-29 02:28:46 0000 -------
Thanks for pointing that out.  I've fixed it.

------- Comment #11 From Wilbur Pan 2008-05-29 10:54:40 0000 -------
(In reply to comment #10)
> Thanks for pointing that out.  I've fixed it.
> 

Just out of curiosity, if the old version of pygtk-2.12.1-r1 needed the
exec_prefix correction in the patch to fix this issue, why wasn't it bumped to
pygtk-2.12.1-r2?

I ask because the exec_prefix bug caused gtk-vnc not to build (see bug
#224039), and if the pygtk version number isn't bumped, doing another
emerge--sync and emerge -u world won't pull the fix in.

------- Comment #12 From Rémi Cardona 2008-05-29 12:27:36 0000 -------
Rebuilding pygtk should have been enough. I've forced a revbump just to be
sure, ebuilds are identical.

Thanks

------- Comment #13 From Gilles Dartiguelongue 2008-07-23 22:11:24 0000 -------
*** Bug 232279 has been marked as a duplicate of this bug. ***

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug