[Bug 510211] Re: 2.6.4-0ubuntu3 distutils modification of self.prefix breaks custom install scripts
Rolf Leggewie
510211 at bugs.launchpad.net
Tue Nov 18 15:16:35 UTC 2014
Karmic has long since stopped to receive any updates. Marking the Karmic
task for this ticket as "Won't Fix".
** Changed in: python2.6 (Ubuntu Karmic)
Status: Incomplete => Won't Fix
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python2.6 in Ubuntu.
https://bugs.launchpad.net/bugs/510211
Title:
2.6.4-0ubuntu3 distutils modification of self.prefix breaks custom
install scripts
Status in “python2.6” package in Ubuntu:
Fix Released
Status in “python2.6” source package in Lucid:
Fix Released
Status in “python2.6” source package in Karmic:
Won't Fix
Bug description:
Binary package hint: python2.6
The file debian/patches/distutils-install-layout.dpatch in
python2.6-2.6.4-0ubuntu3 adds a special check for self.prefix ==
"/usr/local", and changes the value of self.prefix to "/usr" if it is
so. The change that does this is http://bazaar.launchpad.net
/%7Eubuntu-branches/ubuntu/karmic/python2.6/karmic-
proposed/revision/38/debian/patches/distutils-install-layout.dpatch. I
think this was done to fix #456917, but it has the side effect that
other parts of a setup.py file that read sys.prefix will be misled.
This bug affects users who install zenmap from source. Here is a
problem report we received: http://seclists.org/nmap-dev/2010/q1/91.
Our setup.py script, which you can see at
http://nmap.org/svn/zenmap/setup.py, uses self.prefix to do some post-
install modification of installed files. The end effect is that when
the user runs with --prefix=/usr/local, which is the default for our
installer, files get installed in /usr/local/share/zenmap but the
program looks for them in /usr/share/zenmap.
I attached a small setup.py script that demonstrates the problem. The
custom installer tries to modify an installed file after the normal
install process runs, and modifies the wrong file. (You have to supply
a test.py script for the installer to act on.)
$ sudo python setup.py install --prefix="/usr/local"
running install
running build
running build_scripts
running install_scripts
changing mode of /usr/local/bin/test.py to 755
running install_egg_info
Removing /usr/local/lib/python2.6/dist-packages/test-1.0-py2.6.egg-info
Writing /usr/local/lib/python2.6/dist-packages/test-1.0-py2.6.egg-info
self.prefix is '/usr'
Modifying /usr/bin/test.py
This is on Ubuntu 9.10.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.6/+bug/510211/+subscriptions
More information about the foundations-bugs
mailing list