MASTER - package failed to install/upgrade: pycentral pkginstall: not overwriting local files

Bug #291262 reported by Charalampos Gkikas
484
This bug affects 30 people
Affects Status Importance Assigned to Milestone
python-central (Ubuntu)
Won't Fix
High
Unassigned

Bug Description

Binary package hint: update-manager

Can't install python-psyco and other..

:: Symptoms ::
During a dist-upgrade, if some python modules have been installed by hand into the standard location /usr (not /usr/local) then the upgrade will fail with the following error:

=====
Preparing to replace python-psyco 1.5.1-3 (using .../python-psyco_1.6-1_i386.deb) ...
pycentral: pycentral pkgprepare: not overwriting local files
pycentral pkgprepare: not overwriting local files
dpkg: error processing /var/cache/apt/archives/python-psyco_1.6-1_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
=====
or
=====
Setting up python-psyco (1.6-1) ...
pycentral: pycentral pkginstall: not overwriting local files
pycentral pkginstall: not overwriting local files
dpkg: error processing python-psyco (--configure):
 subprocess post-installation script returned error exit status 1
=====

:: How to reproduce ::
The following command will fail:
sudo pycentral pkginstall python-psyco

:: Workaround ::
Remove the manually installed package or set overwrite-local=1 in /etc/python/debian_config and retry the upgrade of the package

Revision history for this message
Charalampos Gkikas (hargikas-gmail) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

Here is what is causing the error:

Preparing to replace python-psyco 1.5.1-3 (using .../python-psyco_1.6-1_i386.deb) ...^M
pycentral: pycentral pkgprepare: not overwriting local files^M
pycentral pkgprepare: not overwriting local files^M
dpkg: error processing /var/cache/apt/archives/python-psyco_1.6-1_i386.deb (--unpack):^M
 subprocess pre-installation script returned error exit status 1^M

Revision history for this message
Michael Vogt (mvo) wrote :
Changed in python-central:
importance: Undecided → High
status: New → Triaged
assignee: nobody → mvo
milestone: none → ubuntu-9.04-beta
Revision history for this message
Matthias Klose (doko) wrote :

I don't like this "solution"; in these cases the user (or better: python developer) did install python modules on his own. You should not mess around more with ignoring these installations in the upgrader. The pycentral manpage documents how the developer can do this himself. For newer python versions we will have another solution as currently implemented in the python3.0 package.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote : Re: package python-psyco 1.6-1 failed to install/upgrade: pycentral pkginstall: not overwriting local files

@Charalampos Gkikas , did you upgrade python-psyco from the official version 1.5.1-3 in hardy ? Have you ever installed python-psyco manually ?

As a workaround you can uninstall then reinstall the package :
sudo apt-get remove --purge python-psyco
sudo apt-get install python-psyco

or you can set overwrite-local=1 in /etc/python/debian_config

Revision history for this message
Charalampos Gkikas (hargikas-gmail) wrote : Re: [Bug 291262] Re: package python-psyco 1.6-1 failed to install/upgrade: pycentral pkginstall: not overwriting local files

Nope!... But I am going to try your workarround

On Sun, Nov 2, 2008 at 12:39 AM, Jean-Baptiste Lallement <
<email address hidden>> wrote:

> @Charalampos Gkikas , did you upgrade python-psyco from the official
> version 1.5.1-3 in hardy ? Have you ever installed python-psyco manually
> ?
>
> As a workaround you can uninstall then reinstall the package :
> sudo apt-get remove --purge python-psyco
> sudo apt-get install python-psyco
>
> or you can set overwrite-local=1 in /etc/python/debian_config
>
> --
> package python-psyco 1.6-1 failed to install/upgrade: pycentral pkginstall:
> not overwriting local files
> https://bugs.launchpad.net/bugs/291262
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "python-central" source package in Ubuntu: Triaged
>
> Bug description:
> Binary package hint: update-manager
>
> Can't install python-psyco and other..
>
> ProblemType: Package
> Architecture: i386
> DistroRelease: Ubuntu 8.10
> ErrorMessage: ErrorMessage: SystemError in cache.commit(): E:Sub-process
> /usr/bin/dpkg returned an error code (1), E:Sub-process /usr/bin/dpkg
> returned an error code (1)
>
> Package: update-manager 1:0.93.32
> PackageArchitecture: all
> SourcePackage: update-manager
> Title: package update-manager 1:0.93.32 failed to install/upgrade:
> ErrorMessage: SystemError in cache.commit(): E:Sub-process /usr/bin/dpkg
> returned an error code (1), E:Sub-process /usr/bin/dpkg returned an error
> code (1)
> Uname: Linux 2.6.24-21-generic i686
>

--
Χάρης

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote : Re: package python-psyco 1.6-1 failed to install/upgrade: pycentral pkginstall: not overwriting local files

Could you please also provide the output of :
sudo pycentral -v pkginstall python-psyco

Thank you

Revision history for this message
Charalampos Gkikas (hargikas-gmail) wrote : Re: [Bug 291262] Re: package python-psyco 1.6-1 failed to install/upgrade: pycentral pkginstall: not overwriting local files

Hello!

I just made the correction you told me (purge and then installed again), and
worked. So I don't know if this is usefull:
pycentral: pycentral -v pkginstall python-psyco
pycentral: reading /usr/share/pyshared-data/python-psyco
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-psyco
pycentral: link shared files python2.5/python-psyco
pycentral: byte-compile files (8/8) python2.5
pycentral: ['/usr/lib/python2.5/site-packages/psyco-1.6.egg-info',
'/usr/lib/python2.5/site-packages/psyco/__init__.py', '...']

Hope it helps.
Harry

On Tue, Nov 4, 2008 at 1:36 AM, Jean-Baptiste Lallement <
<email address hidden>> wrote:

> Could you please also provide the output of :
> sudo pycentral -v pkginstall python-psyco
>
> Thank you
>
> --
> package python-psyco 1.6-1 failed to install/upgrade: pycentral pkginstall:
> not overwriting local files
> https://bugs.launchpad.net/bugs/291262
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "python-central" source package in Ubuntu: Triaged
>
> Bug description:
> Binary package hint: update-manager
>
> Can't install python-psyco and other..
>
> ProblemType: Package
> Architecture: i386
> DistroRelease: Ubuntu 8.10
> ErrorMessage: ErrorMessage: SystemError in cache.commit(): E:Sub-process
> /usr/bin/dpkg returned an error code (1), E:Sub-process /usr/bin/dpkg
> returned an error code (1)
>
> Package: update-manager 1:0.93.32
> PackageArchitecture: all
> SourcePackage: update-manager
> Title: package update-manager 1:0.93.32 failed to install/upgrade:
> ErrorMessage: SystemError in cache.commit(): E:Sub-process /usr/bin/dpkg
> returned an error code (1), E:Sub-process /usr/bin/dpkg returned an error
> code (1)
> Uname: Linux 2.6.24-21-generic i686
>

--
Χάρης

Revision history for this message
Martin Pitt (pitti) wrote : Re: package python-psyco 1.6-1 failed to install/upgrade: pycentral pkginstall: not overwriting local files

Confirming this error with a failure of python-numpy on an 8.04 -> 8.10 upgrade on a friend's computer. The very same problem already happened during 7.10 -> 8.04 upgrade on this box.

Vorbereiten zum Ersetzen von python-numpy 1:1.0.3-1ubuntu2 (durch .../python-numpy_1%3a1.0.4-6ubuntu3_i386.deb) ...
pycentral: pycentral pkgprepare: not overwriting local files
pycentral pkgprepare: not overwriting local files
dpkg: Fehler beim Bearbeiten von /var/cache/apt/archives/python-numpy_1%3a1.0.4-6ubuntu3_i386.deb (--unpack):
 Unterprozess pre-installation script gab den Fehlerwert 1 zurück
_0.6.0-8ubuntu1_i386.deb) ...

Revision history for this message
Michael Vogt (mvo) wrote :

@doko: I think this is a appropriate solution for dist-upgrades (not that its not the default, just set on dist-upgrades).

If a user uses "./configure --prefix=/usr;make;make install" the upgrade will overwrite those files too. I don't see why we should handle python-modules different here. Especially given that its a dist-upgrade and a certain amount of change can be expected. If the user installed his python-modules into /usr/local that is a different matter of course, but I don't think this is the issue here.

Revision history for this message
Martin Pitt (pitti) wrote :

Full ack. Locally installed packages into /usr are *guaranteed* to be doomed for all other packages, no reason to jump through hoops and break upgrades for regular Ubuntu users to support a special case which isn't supposed to work at all.

description: updated
Revision history for this message
Cwelch (cwelch-macalester) wrote :

I had an issue upgrading a different part of the python RE, but I solved like an above user by purging and then reinstalling the problem packages. Maybe patch the distro upgrader temporarily to automatically purge python-* files before reinstalling them since they seem to be causing problems?

Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote :

Hi,

Thanks to Jean-Baptiste for pointing me out this discussion.

Re /usr and /usr/local, Michael Vogt puts it well: installing to /usr is doomed. But users don't always know it, or even understand the difference. I suggest Ubuntu changes the default configuration of python distutils and setuptools to install to /usr/local. IMHO defaulting to /usr is a bug.

Revision history for this message
Scott Kitterman (kitterman) wrote :

This is not just happening with user installed packages. Yesterday I got this error working in a clean Jaunty chroot to try and find packages needing rebuilt for the Python 2.6 transition. Unfortunately I can't replicate it now, but I'm attaching what I had left of the scrollback from the the error.

Michael Vogt (mvo)
Changed in python-central:
assignee: mvo → nobody
Revision history for this message
Martin Pitt (pitti) wrote :

Milestoned bug, tentatively setting Matthias as assignee. Matthias, if you think that this shouldn't be a release blocker, please un-milestone and un-assign as you see fit. Thanks!

Changed in python-central:
assignee: nobody → doko
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I've tried to reproduce this bug on Lucid and I'm failing to do that. Does this bug still affect Lucid? Does anyone still uses pycentral?

Changed in python-central (Ubuntu):
status: Triaged → Incomplete
tags: added: metabug
Revision history for this message
Matthias Klose (doko) wrote :

won't fix anymore for jaunty

Changed in python-central (Ubuntu):
assignee: Matthias Klose (doko) → nobody
status: Incomplete → Won't Fix
To post a comment you must log in.