package python-mechanize 0.1.11-0ubuntu1 failed to install/upgrade and python-central gives misleading error message

Bug #347939 reported by Michael Vogt on 2009-03-24
14
Affects Status Importance Assigned to Milestone
python-central (Ubuntu)
Medium
Michael Vogt
Jaunty
Medium
Michael Vogt
zope3 (Ubuntu)
High
Michael Vogt
Jaunty
High
Michael Vogt

Bug Description

Binary package hint: python-mechanize

Happens during a upgrade test

ProblemType: Package
Architecture: i386
DistroRelease: Ubuntu 9.04
ErrorMessage:
 ErrorMessage: subprocess post-installation script returned error exit status 1
Package: python-mechanize 0.1.11-0ubuntu1
PackageArchitecture: all
SourcePackage: python-mechanize
Title: package python-mechanize 0.1.11-0ubuntu1 failed to install/upgrade:
Uname: Linux 2.6.27-11-server i686

Michael Vogt (mvo) wrote :
Michael Vogt (mvo) wrote :

The attachment is corrupted for some reason, but here is the error:

Setting up python-mechanize (0.1.11-0ubuntu1) ...^M
pycentral: pycentral pkginstall: not overwriting local files:^M
  /usr/lib/python2.5/site-packages/mechanize/__init__.py^M
  /usr/lib/python2.5/site-packages/mechanize/_auth.py^M
  /usr/lib/python2.5/site-packages/mechanize/_clientcookie.py^M
  /usr/lib/python2.5/site-packages/mechanize/_gzip.py^M
  /usr/lib/python2.5/site-packages/mechanize/_headersutil.py^M
  /usr/lib/python2.5/site-packages/mechanize/_html.py^M
  /usr/lib/python2.5/site-packages/mechanize/_lwpcookiejar.py^M
  /usr/lib/python2.5/site-packages/mechanize/_mechanize.py^M
  /usr/lib/python2.5/site-packages/mechanize/_mozillacookiejar.py^M
  /usr/lib/python2.5/site-packages/mechanize/_msiecookiejar.py^M
  /usr/lib/python2.5/site-packages/mechanize/_opener.py^M
  /usr/lib/python2.5/site-packages/mechanize/_pullparser.py^M
  /usr/lib/python2.5/site-packages/mechanize/_request.py^M
  /usr/lib/python2.5/site-packages/mechanize/_urllib2.py^M
  /usr/lib/python2.5/site-packages/mechanize/_useragent.py^M
  /usr/lib/python2.5/site-packages/mechanize/_util.py^M
pycentral pkginstall: not overwriting local files:^M
  /usr/lib/python2.5/site-packages/mechanize/__init__.py^M
  /usr/lib/python2.5/site-packages/mechanize/_auth.py^M
  /usr/lib/python2.5/site-packages/mechanize/_clientcookie.py^M
  /usr/lib/python2.5/site-packages/mechanize/_gzip.py^M
  /usr/lib/python2.5/site-packages/mechanize/_headersutil.py^M
  /usr/lib/python2.5/site-packages/mechanize/_html.py^M
  /usr/lib/python2.5/site-packages/mechanize/_lwpcookiejar.py^M
  /usr/lib/python2.5/site-packages/mechanize/_mechanize.py^M
  /usr/lib/python2.5/site-packages/mechanize/_mozillacookiejar.py^M
  /usr/lib/python2.5/site-packages/mechanize/_msiecookiejar.py^M
  /usr/lib/python2.5/site-packages/mechanize/_opener.py^M
  /usr/lib/python2.5/site-packages/mechanize/_pullparser.py^M
  /usr/lib/python2.5/site-packages/mechanize/_request.py^M
  /usr/lib/python2.5/site-packages/mechanize/_urllib2.py^M
  /usr/lib/python2.5/site-packages/mechanize/_useragent.py^M
  /usr/lib/python2.5/site-packages/mechanize/_util.py^M
dpkg: error processing python-mechanize (--configure):^M
 subprocess post-installation script returned error exit status 1^M

Scott Kitterman (kitterman) wrote :

I assume you didn't have a local (not from a package) copy of python-mechanize installed?

Michael Vogt (mvo) wrote :
Michael Vogt (mvo) wrote :

@Scott: no, this was a automatic install/upgrade test, no manual installs of any sort.

I think thay make this a python-central bug then. Would you agree?

The python-central version in use is 0.6.11ubuntu4. The package contains symlinks to pyshared for e.g. __init__.py and _auth.py. I don't know why pycentral complains at this point, but it looks like a issue with pycentral to me.

Michael Vogt (mvo) wrote :

It looks like this bug depends on the order of the upgrade, I just could not reproduce it in a minimal pbuilder chroot.

Michael Vogt (mvo) wrote :
Michael Vogt (mvo) wrote :

The python-mechanize bits of the log:

2009-03-24 23:15:17 0 pycentral pkginstall python-mechanize
2009-03-24 23:15:17 0 reading /usr/share/pyshared-data/python-mechanize
2009-03-24 23:15:17 0 Not using dpkg-query as requested
2009-03-24 23:15:17 0 avail=['2.6', '2.5', '2.4'], pkg=>= 2.5, install=['2.6', '2.5']
2009-03-24 23:15:17 0 install package python-mechanize
2009-03-24 23:15:17 0 link shared files python2.6/python-mechanize
2009-03-24 23:15:17 0 byte-compile files (35/35) python2.6
2009-03-24 23:15:17 0 ['/usr/lib/python2.6/dist-packages/mechanize', '/usr/lib/python2.6/dist-packages/mechanize.egg-info', '...']
2009-03-24 23:15:17 0 link shared files python2.5/python-mechanize
2009-03-24 23:15:17 3 pycentral pkginstall: not overwriting local files:
  /usr/lib/python2.5/site-packages/mechanize/__init__.py
  /usr/lib/python2.5/site-packages/mechanize/_auth.py
  /usr/lib/python2.5/site-packages/mechanize/_clientcookie.py
  /usr/lib/python2.5/site-packages/mechanize/_gzip.py
  /usr/lib/python2.5/site-packages/mechanize/_headersutil.py
  /usr/lib/python2.5/site-packages/mechanize/_html.py
  /usr/lib/python2.5/site-packages/mechanize/_lwpcookiejar.py
  /usr/lib/python2.5/site-packages/mechanize/_mechanize.py
  /usr/lib/python2.5/site-packages/mechanize/_mozillacookiejar.py
  /usr/lib/python2.5/site-packages/mechanize/_msiecookiejar.py
  /usr/lib/python2.5/site-packages/mechanize/_opener.py
  /usr/lib/python2.5/site-packages/mechanize/_pullparser.py
  /usr/lib/python2.5/site-packages/mechanize/_request.py
  /usr/lib/python2.5/site-packages/mechanize/_urllib2.py
  /usr/lib/python2.5/site-packages/mechanize/_useragent.py
  /usr/lib/python2.5/site-packages/mechanize/_util.py

Michael Vogt (mvo) wrote :
Michael Vogt (mvo) wrote :

Looks like this is a problem/conflitct of python-mechanize with zope3:

$ dpkg -c zope3_3.4.0-0ubuntu2_amd64.deb |grep mechanize
drwxr-xr-x root/root 0 2009-02-21 18:24 ./usr/lib/python2.5/site-packages/mechanize/
-rw-r--r-- root/root 1245 2009-01-30 05:27 ./usr/lib/python2.5/site-packages/mechanize/__init__.py
...

Michael Vogt (mvo) wrote :

I will keep a python-central task open, the way it reports the error is pretty misleading (and I wonder how many of the duplicates of #291262 are actually dpkg file conflicts and not local installs).

Michael Vogt (mvo) wrote :

I look at the python-mechanize failure now, it needs fixing for jaunty because it breaks upgrades.

Changed in python-mechanize (Ubuntu Jaunty):
assignee: nobody → mvo
importance: Undecided → High
status: New → Triaged
summary: - package python-mechanize 0.1.11-0ubuntu1 failed to install/upgrade:
+ package python-mechanize 0.1.11-0ubuntu1 failed to install/upgrade and
+ python-central gives misleading error message
Michael Vogt (mvo) wrote :

I assign the python-central bug to doko for now, feel free to adjust priority etc.

Changed in python-central (Ubuntu Jaunty):
assignee: nobody → doko
importance: Undecided → Medium
status: New → Triaged
Michael Vogt (mvo) wrote :
Download full text (6.6 KiB)

I patched python-central now to give a more meaningful error message:

$ sudo apt-get install zope3
Reading package lists... Done
Building dependency tree
Reading state information... Done

The following extra packages will be installed:
  python-clientform python-mechanize python-twisted-web2 python-tz python2.4
  python2.4-minimal zope-common
Suggested packages:
  zope3-dbg
The following NEW packages will be installed:
  python-clientform python-mechanize python-twisted-web2 python-tz python2.4
  python2.4-minimal zope-common zope3
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 9853kB of archives.
After this operation, 52,2MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com jaunty/main python2.4-minimal 2.4.6-1ubuntu3 [1065kB]
Get:2 http://archive.ubuntu.com jaunty/main python2.4 2.4.6-1ubuntu3 [2932kB]
Get:3 http://archive.ubuntu.com jaunty/main zope-common 0.5.46 [45,8kB]
Get:4 http://archive.ubuntu.com jaunty/main python-tz 2008i-1 [30,3kB]
Get:5 http://archive.ubuntu.com jaunty/main python-clientform 0.2.9-1 [62,0kB]
Get:6 http://archive.ubuntu.com jaunty/main python-mechanize 0.1.11-0ubuntu1 [144kB]
Get:7 http://archive.ubuntu.com jaunty/main python-twisted-web2 8.1.0-1 [180kB]
Get:8 http://archive.ubuntu.com jaunty/main zope3 3.4.0-0ubuntu2 [5395kB]
Fetched 9853kB in 0s (32,3MB/s)
Preconfiguring packages ...
Selecting previously deselected package python2.4-minimal.
(Reading database ... 585444 files and directories currently installed.)
Unpacking python2.4-minimal (from .../python2.4-minimal_2.4.6-1ubuntu3_amd64.deb) ...
Selecting previously deselected package python2.4.
Unpacking python2.4 (from .../python2.4_2.4.6-1ubuntu3_amd64.deb) ...
Selecting previously deselected package zope-common.
Unpacking zope-common (from .../zope-common_0.5.46_all.deb) ...
Selecting previously deselected package python-tz.
Unpacking python-tz (from .../python-tz_2008i-1_all.deb) ...
Selecting previously deselected package python-clientform.
Unpacking python-clientform (from .../python-clientform_0.2.9-1_all.deb) ...
Selecting previously deselected package python-mechanize.
Unpacking python-mechanize (from .../python-mechanize_0.1.11-0ubuntu1_all.deb) ...
Selecting previously deselected package python-twisted-web2.
Unpacking python-twisted-web2 (from .../python-twisted-web2_8.1.0-1_all.deb) ...
Processing triggers for man-db ...
Processing triggers for menu ...
Setting up python2.4-minimal (2.4.6-1ubuntu3) ...

Setting up python2.4 (2.4.6-1ubuntu3) ...

Setting up zope-common (0.5.46) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Processing triggers for menu ...
Selecting previously deselected package zope3.
(Reading database ... 586301 files and directories currently installed.)
Unpacking zope3 (from .../zope3_3.4.0-0ubuntu2_amd64.deb) ...
Setting up python-tz (2008i-1) ...
pycentral: pycentral pkginstall: Not overwriting files owned by other packages:
  zope3: /usr/lib/python2.5/site-packages/pytz/__init__.py
  zope3: /usr/lib/python2.5/site-packages/pytz/reference.py
  zope3: /usr/lib/python2.5/site-packages/pytz/tzfile.py
  zope3: /usr/lib/python2.5/site-...

Read more...

Michael Vogt (mvo) wrote :

I added code to python-central that detects if the files come from a package or from a local install now.

Changed in python-central (Ubuntu Jaunty):
assignee: doko → mvo
status: Triaged → Fix Committed
Michael Vogt (mvo) wrote :

Possible fix:

diff -u zope3-3.4.0/debian/changelog zope3-3.4.0/debian/changelog
--- zope3-3.4.0/debian/changelog
+++ zope3-3.4.0/debian/changelog
@@ -1,3 +1,9 @@
+zope3 (3.4.0-0ubuntu3) jaunty; urgency=low
+
+ * make it installable without pycentral error
+
+ -- Michael Vogt <email address hidden> Wed, 25 Mar 2009 17:59:15 +0100
+
 zope3 (3.4.0-0ubuntu2) jaunty; urgency=low

   * Regenerate the python-zopeinterface pkgconfig file. LP: #332516.
diff -u zope3-3.4.0/debian/rules zope3-3.4.0/debian/rules
--- zope3-3.4.0/debian/rules
+++ zope3-3.4.0/debian/rules
@@ -117,16 +117,16 @@

 install-arch: build-arch build-dbg install-prereq $(PYVERS:%=install-zif-python%) install-zope-dbg
        # Remove not needed stuff
- rm -fr $(d_lib)/usr/lib/python2.[46]/*-packages/twisted/trial/test/scripttest.py \
- $(d_lib)/usr/lib/python2.[46]/*-packages/mechanize \
- $(d_lib)/usr/lib/python2.[46]/*-packages/ClientCookie \
- $(d_lib)/usr/lib/python2.[46]/*-packages/zope/formlib/LICENSE.txt
+ rm -fr $(d_lib)/usr/lib/python2.[4-6]/*-packages/twisted/trial/test/scripttest.py \
+ $(d_lib)/usr/lib/python2.[4-6]/*-packages/mechanize \
+ $(d_lib)/usr/lib/python2.[4-6]/*-packages/ClientCookie \
+ $(d_lib)/usr/lib/python2.[4-6]/*-packages/zope/formlib/LICENSE.txt

        # remove docutils and pytz
- rm -fr $(d_lib)/usr/lib/python2.[46]/*-packages/docutils \
- $(d_lib)/usr/lib/python2.[46]/*-packages/pytz \
- $(d_lib)/usr/lib/python2.[46]/*-packages/ClientForm.py \
- $(d_lib)/usr/lib/python2.[46]/*-packages/pullparser.py
+ rm -fr $(d_lib)/usr/lib/python2.[4-6]/*-packages/docutils \
+ $(d_lib)/usr/lib/python2.[4-6]/*-packages/pytz \
+ $(d_lib)/usr/lib/python2.[4-6]/*-packages/ClientForm.py \
+ $(d_lib)/usr/lib/python2.[4-6]/*-packages/pullparser.py

        # remove files from zope3 also in default zopeinterface package
        ( \

Changed in zope3 (Ubuntu Jaunty):
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-central - 0.6.11ubuntu5

---------------
python-central (0.6.11ubuntu5) jaunty; urgency=low

  * pycentral.py:
    - when detecting already existing files check if those
      are local installs (via setup.py) or file conflicts from
      other packages and give a meaningful error message
      (LP: #347939)

 -- Michael Vogt <email address hidden> Wed, 25 Mar 2009 17:19:39 +0100

Changed in python-central:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zope3 - 3.4.0-0ubuntu3

---------------
zope3 (3.4.0-0ubuntu3) jaunty; urgency=low

  * fix undeclared file conflicts that cause python-central to
    error in postinst (LP: #347939)

 -- Michael Vogt <email address hidden> Wed, 25 Mar 2009 17:59:15 +0100

Changed in zope3:
status: In Progress → Fix Released
tags: added: iso-testing
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers