python-central doesn't handle modified symlinks created with symlinks -c

Bug #204526 reported by Joachim Beckers
16
Affects Status Importance Assigned to Milestone
python-central (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: gnome-menus

dpkg fails saying:

Setting up python-gmenu (2.22.0-0ubuntu1) ...
pycentral: pycentral pkginstall: not overwriting local files
pycentral pkginstall: not overwriting local files
dpkg: error processing python-gmenu (--configure):
 subprocess post-installation script returned error exit status 1

after editing /var/lib/dpkg/info/python-gmenu.postinst to add the -v flag to pycentral, it gives:

joachim@Mackeunnen:/var/lib/dpkg/info$ ./python-gmenu.postinst
pycentral: pycentral -v pkginstall python-gmenu
pycentral: reading /usr/share/pyshared-data/python-gmenu
pycentral: Using python-version from pkgconfig: 2.4, 2.5
pycentral: avail=['2.5'], pkg=2.4, 2.5, install=['2.5']
pycentral: install package python-gmenu
pycentral: link shared files python2.5/python-gmenu
pycentral: pycentral pkginstall: not overwriting local files
pycentral pkginstall: not overwriting local files

Revision history for this message
Matthias Klose (doko) wrote :

which version of python-central was used for the upgrade?
please could you recheck after installing the current python-central version?

thanks, Matthias

Changed in python-central:
status: New → Incomplete
Revision history for this message
Joachim Beckers (jbeckers) wrote :

I have two fully up-to-date systems (one 32 and one 64 bit), with the latest python-central. that's 0.6.1ubuntu1

both systems recently were hit by this resolved bug (https://bugs.launchpad.net/ubuntu/+source/python-central/+bug/192992), maybe that is the origin of this problem?

note that I don't have any custom python stuff installed, so the "not overwriting" error is bogus.

furthermore, if this is a python-central bug, then so are bug #204524 and #204528

Changed in python-central:
status: Incomplete → New
Revision history for this message
Joachim Beckers (jbeckers) wrote :

workaround:
---------------

temporarily add
  overwrite-local = 1
to /etc/python/debian_config.

result:
--------

Setting up python-gmenu (2.22.0-0ubuntu1) ...
overwriting local files
warning: already exists: /usr/lib/python2.5/site-packages/GMenuSimpleEditor/__init__.py -> ../../../../share/pyshared/GMenuSimpleEditor/__init__.py
warning: already exists: /usr/lib/python2.5/site-packages/GMenuSimpleEditor/config.py -> ../../../../share/pyshared/GMenuSimpleEditor/config.py
warning: already exists: /usr/lib/python2.5/site-packages/GMenuSimpleEditor/main.py -> ../../../../share/pyshared/GMenuSimpleEditor/main.py
warning: already exists: /usr/lib/python2.5/site-packages/GMenuSimpleEditor/maindialog.py -> ../../../../share/pyshared/GMenuSimpleEditor/maindialog.py
warning: already exists: /usr/lib/python2.5/site-packages/GMenuSimpleEditor/menufilewriter.py -> ../../../../share/pyshared/GMenuSimpleEditor/menufilewriter.py
warning: already exists: /usr/lib/python2.5/site-packages/GMenuSimpleEditor/menutreemodel.py -> ../../../../share/pyshared/GMenuSimpleEditor/menutreemodel.py

Revision history for this message
Matthias Klose (doko) wrote :

> warning: already exists: /usr/lib/python2.5/site-packages/GMenuSimpleEditor/__init__.py -> ../../../../share/pyshared/GMenuSimpleEditor/__init__.py

this is strange; we only create absolute symlinks to the pyshared area. I can't see how those are created.

Revision history for this message
Joachim Beckers (jbeckers) wrote :

Oh, I know why: I run symlinks from time to time to cleanup broken links, like this:

sudo symlinks -cdrs /

I guess this is the culprit then?

Revision history for this message
Matthias Klose (doko) wrote :

yes it is.

Changed in python-central:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-central - 0.6.5ubuntu1

---------------
python-central (0.6.5ubuntu1) hardy; urgency=low

  * Don't complain about absolute symlinks replaced by relative symlinks
    pointing to the pyshared directory. Might happen if a user runs
    symlinks -c, or a chroot is prepared for use with fakechroot (Ubuntu's
    apport retrace service runs in such an environment). LP: #204526.
  * Don't create preinst scripts, if the packages doesn't have any shared
    files.
  * On upgrade, remove byte-code files for private modules not existing
    anymore in a new version of a package. Closes: #476976.
  * pycentral pkgprepare: Skip package, if the required runtime is not
    yet installed. Closes: #476685.
  * pycentral version: New subcommand.

 -- Matthias Klose <email address hidden> Tue, 22 Apr 2008 10:02:46 +0200

Changed in python-central:
status: Confirmed → Fix Released
Revision history for this message
drewp (drewp) wrote :

I also had trouble with this link today:
lrwxrwxrwx 1 root root 55 2008-04-21 02:55 /usr/lib/python2.5/site-packages/GMenuSimpleEditor/menufilewriter.py -> /usr/share/pyshared/GMenuSimpleEditor/menufilewriter.py

"aptitude reinstall python-gmenu" didn't help. My workaround was to run this:
sudo ln -s /usr/share/python-support/python-gmenu/GMenuSimpleEditor/ /usr/share/pyshared/

I'm on ubuntu 8.10, on a machine that has been upgraded through a few past versions of ubuntu.

Revision history for this message
datakid (datakid) wrote :

this work around worked for me, on intrepid.

Note that this bug has been reposted here:
https://bugs.launchpad.net/ubuntu/+source/gnome-menus/+bug/301571

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.