<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>194343</bug_id>
          
          <creation_ts>2007-10-01 06:40 0000</creation_ts>
          <short_desc>dev-python/pygtk incorrectly stores .pyc files in /usr/share/</short_desc>
          <delta_ts>2008-07-23 22:11:24 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>vapier@gentoo.org</reporter>
          <assigned_to>gnome@gentoo.org</assigned_to>
          <cc>Michael_Dehler@web.de</cc>
    
    <cc>mikachu@gmail.com</cc>
    
    <cc>python@gentoo.org</cc>
    
    <cc>radek@podgorny.cz</cc>
    
    <cc>shawvrana@gmail.com</cc>
    
    <cc>wpan03@gmail.com</cc>

      

      
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-10-01 06:40:25 0000</bug_when>
            <thetext>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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eva@gentoo.org</who>
            <bug_when>2008-04-14 10:10:47 0000</bug_when>
            <thetext>*** Bug 217591 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ford_prefect@gentoo.org</who>
            <bug_when>2008-04-14 16:14:21 0000</bug_when>
            <thetext>Created an attachment (id=149701)
patch to install codegen into /usr/lib/python-2.x/site-packages

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>remi@gentoo.org</who>
            <bug_when>2008-04-14 17:34:58 0000</bug_when>
            <thetext>Patch looks good, but I don&apos;t really see the point of :

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

Why not do :

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

...unless &quot;pkgpythondir&quot; is reused someplace... Am I missing something?

Patch should be sent upstream too imho :) Great stuff</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>remi@gentoo.org</who>
            <bug_when>2008-04-14 17:36:24 0000</bug_when>
            <thetext>(In reply to comment #3)
&gt; Patch should be sent upstream too imho :) Great stuff

/me should have checked his inbox thoroughly before writing dumb comments :p</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ford_prefect@gentoo.org</who>
            <bug_when>2008-04-14 19:48:46 0000</bug_when>
            <thetext>(In reply to comment #3)
&gt; Patch looks good, but I don&apos;t really see the point of :
&gt; 
&gt; pkgpythondir = $(pyexecdir)/gtk-2.0
&gt; codegendir = $(pkgpythondir)/codegen
&gt; 
&gt; Why not do :
&gt; 
&gt; 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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ford_prefect@gentoo.org</who>
            <bug_when>2008-04-14 19:53:38 0000</bug_when>
            <thetext>(In reply to comment #5)
&gt; I just copied the way upstream did it for other stuff, though I do take your
&gt; point. And the set of functions exported by the python m4 macros just added to
&gt; 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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>remi@gentoo.org</who>
            <bug_when>2008-05-28 10:12:32 0000</bug_when>
            <thetext>Created an attachment (id=154565)
patch to install codegen into /usr/lib/python-2.x/site-packages

Simpler patch, should be safer imho.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>remi@gentoo.org</who>
            <bug_when>2008-05-28 14:04:26 0000</bug_when>
            <thetext>I&apos;ve just committed my patch to portage on pygtk-2.12.1-r1.

Closing</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mikachu@gmail.com</who>
            <bug_when>2008-05-28 20:11:35 0000</bug_when>
            <thetext>After i installed the new revision i got this error while building the gimp:
/usr/bin/python: can&apos;t open file &apos;/lib/python2.5/site-packages/gtk-2.0/codegen/codegen.py&apos;: [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 &quot;$@&quot;



Note that exec_prefix isn&apos;t set anywhere...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dang@gentoo.org</who>
            <bug_when>2008-05-29 02:28:46 0000</bug_when>
            <thetext>Thanks for pointing that out.  I&apos;ve fixed it.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wpan03@gmail.com</who>
            <bug_when>2008-05-29 10:54:40 0000</bug_when>
            <thetext>(In reply to comment #10)
&gt; Thanks for pointing that out.  I&apos;ve fixed it.
&gt; 

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&apos;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&apos;t bumped, doing another emerge--sync and emerge -u world won&apos;t pull the fix in.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>remi@gentoo.org</who>
            <bug_when>2008-05-29 12:27:36 0000</bug_when>
            <thetext>Rebuilding pygtk should have been enough. I&apos;ve forced a revbump just to be sure, ebuilds are identical.

Thanks</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eva@gentoo.org</who>
            <bug_when>2008-07-23 22:11:24 0000</bug_when>
            <thetext>*** Bug 232279 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>149701</attachid>
            <date>2008-04-14 16:14 0000</date>
            <desc>patch to install codegen into /usr/lib/python-2.x/site-packages</desc>
            <filename>pygtk-2.12.1-install-codegen-to-usr-lib.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">ZGlmZiAtdXJOcCBweWd0ay0yLjEyLjEtb3JpZy9jb2RlZ2VuL01ha2VmaWxlLmFtIHB5Z3RrLTIu
MTIuMS1uZXcvY29kZWdlbi9NYWtlZmlsZS5hbQotLS0gcHlndGstMi4xMi4xLW9yaWcvY29kZWdl
bi9NYWtlZmlsZS5hbQkyMDA4LTA0LTE0IDE2OjE1OjA4LjAwMDAwMDAwMCArMDUzMAorKysgcHln
dGst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leGVjZGly
PUBweWV4ZWNkaXJACitjb2RlZ2VuZGlyPSR7cHlleGVjZGlyfS9ndGstMi4wL2NvZGVnZW4KIAog
UFlUSE9OUEFUSD0kY29kZWdlbmRpcgogZXhwb3J0IFBZVEhPTlBBVEgKZGlmZiAtdXJOcCBweWd0
ay0yLjEyLjEtb3JpZy9weWd0ay0yLjAucGMuaW4gcHlndGstMi4xMi4xLW5ldy9weWd0ay0yLjAu
cGMuaW4KLS0tIHB5Z3RrLTIuMTIuMS1vcmlnL3B5Z3RrLTIuMC5wYy5pbgkyMDA4LTA0LTE0IDE2
OjE1OjA4LjAwMDAwMDAwMCArMDUzMAorKysgcHlndGstMi4xMi4xLW5ldy9weWd0ay0yLjAucGMu
aW4JMjAwOC0wNC0xNCAxOTo0MDoxOC4wMDAwMDAwMDAgKzA1MzAKQEAgLTEyLDcgKzEyLDcgQEAg
cHlndGtpbmNsdWRlZGlyPSR7aW5jbHVkZWRpcn0vcHlndGstMi4wCiAKICMgc2FtZSBoZXJlLiAg
VXNlZnVsIHdoZW4gY2FsbGluZyB0aGUgY29kZSBnZW5lcmF0b3IgaW4gYWRkb24gcGFja2FnZXMu
CiBkZWZzZGlyPSR7ZGF0YWRpcn0vcHlndGsvMi4wL2RlZnMKLWNvZGVnZW5kaXI9JHtkYXRhZGly
fS9weWd0ay8yLjAvY29kZWdlbgorY29kZWdlbmRpcj0ke3B5ZXhlY2Rpcn0vZ3RrLTIuMC9jb2Rl
Z2VuCiAKIE5hbWU6IFB5R1RLCiBEZXNjcmlwdGlvbjogUHl0aG9uIGJpbmRpbmdzIGZvciBHVEsr
IGFuZCByZWxhdGVkIGxpYnJhcmllcwo=
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>154565</attachid>
            <date>2008-05-28 10:12 0000</date>
            <desc>patch to install codegen into /usr/lib/python-2.x/site-packages</desc>
            <filename>patch</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IHB5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QVRIPSRjb2RlZ2VuZGlyCiBleHBvcnQgUFlUSE9OUEFUSApJ
bmRleDogY29kZWdlbi9NYWtlZmlsZS5hbQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBjb2RlZ2VuL01ha2VmaWxl
LmFtCShyZXZpc2lvbiAyOTgzKQorKysgY29kZWdlbi9NYWtlZmlsZS5hbQkod29ya2luZyBjb3B5
KQpAQCAtMiw3ICsyLDcgQEAKIAogYmluX1NDUklQVFMgPSBweWd0ay1jb2RlZ2VuLSQoUExBVEZP
Uk1fVkVSU0lPTikKIAotY29kZWdlbmRpciA9ICQocGtnZGF0YWRpcikvJChQTEFURk9STV9WRVJT
SU9OKS9jb2RlZ2VuCitjb2RlZ2VuZGlyID0gJChweWV4ZWNkaXIpL2d0ay0yLjAvY29kZWdlbgog
CiBjb2RlZ2VuX1BZVEhPTiA9IFwKIAlfX2luaXRfXy5weSBcCg==
</data>        

          </attachment>
    </bug>

</bugzilla>