python-pysnmp-common conflicts with python-pysnmp2

Bug #769205 reported by scm
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-pysnmp4 (Ubuntu)
Fix Released
Medium
Unassigned
Lucid
Fix Released
Medium
Unassigned

Bug Description

In Lucid it is currently possible to install both python-snmp-common and python-pysnmp2 on the same system but since both provide the same file one ends up with broken packages.

This has been fixed in python-snmp4 version 4.1.9a-2 by adding a breaks and conflicts (http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/natty/python-pysnmp4/natty/revision/8) with python-snmp2. This fix should be included in Lucid to prevent people from ending up in a situation where they have broken packages.

TEST CASE:

1) sudo apt-get install python-pysnmp-common
2) sudo apt-get install python-pysnmp2
3) observe dpkg returning an error code

1) sudo apt-get install python-snmp-common and python-pysnmp4 from lucid-proposed
2) sudo apt-get install python-pysnmp2
3) observe that python-pysnmp2 is not installable

-------

Binary package hint: python-pysnmp-common

This is about the versions currently available for Lucid (10.04)

There should be a conflicts relationship between python-pysnmp-common and python-pysnmp2 since both attempt to provide the same file. This results in a dpkg failure if trying to apt-get install either package after the other.

 scm@scm:/tmp/tmp.jemCOScqRP$ dpkg --contents python-pysnmp2_2.0.9-2_all.deb | grep __init__
-rw-r--r-- root/root 334 2002-05-20 08:12 ./usr/share/pyshared/pysnmp/__init__.py
scm@scm:/tmp/tmp.jemCOScqRP$ dpkg --contents python-pysnmp-common_4.1.9a-1ubuntu0.10.04.1_all.deb | grep __init__
-rw-r--r-- root/root 844 2006-12-13 12:23 ./usr/share/pyshared/pysnmp/__init__.py

What happened:

scm@scm:/tmp/tmp.jemCOScqRP$ sudo apt-get install python-pysnmp-common
[SNIP]
Setting up python-pysnmp-common (4.1.9a-1ubuntu0.10.04.1) ...
ldconfig deferred processing now taking place
Processing triggers for python-support ...
scm@scm:/tmp/tmp.jemCOScqRP$ dpkg -s python-pysnmp-common
Package: python-pysnmp-common
Status: install ok installed
Priority: optional
Section: python
Installed-Size: 72
Maintainer: Ubuntu MOTU Developers <email address hidden>
Architecture: all
Source: python-pysnmp4
Version: 4.1.9a-1ubuntu0.10.04.1

scm@scm:/tmp/tmp.jemCOScqRP$ sudo apt-get install python-pysnmp2
[SNIP]
Fetched 42.6kB in 0s (216kB/s)
Selecting previously deselected package python-pysnmp2.
(Reading database ... 239263 files and directories currently installed.)
Unpacking python-pysnmp2 (from .../python-pysnmp2_2.0.9-2_all.deb) ...
dpkg: error processing /var/cache/apt/archives/python-pysnmp2_2.0.9-2_all.deb (--unpack):
 trying to overwrite '/usr/share/pyshared/pysnmp/__init__.py', which is also in package python-pysnmp-common 0:4.1.9a-1ubuntu0.10.04.1
Errors were encountered while processing:
 /var/cache/apt/archives/python-pysnmp2_2.0.9-2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
scm@scm:/tmp/tmp.jemCOScqRP$ dpkg -s python-pysnmp2
Package: python-pysnmp2
Status: install ok not-installed
Priority: optional
Section: python

Yikes, now I have a broken package.

What I expected:

Apt should have nicely warned me about this conflict.

Changed in python-pysnmp4 (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I can confirm this issue:

jsalisbury@salisbury-lucid-multi-nic:~$ sudo apt-get install python-pysnmp-common
Setting up python-pysnmp-common (4.1.9a-1ubuntu0.10.04.1) ...
...

###########################

jsalisbury@salisbury-lucid-multi-nic:~$ sudo apt-get install python-pysnmp2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  python-pysnmp2
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 42.6kB of archives.
After this operation, 365kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/universe python-pysnmp2 2.0.9-2 [42.6kB]
Fetched 42.6kB in 14s (2,893B/s)
Selecting previously deselected package python-pysnmp2.
(Reading database ... 42723 files and directories currently installed.)
Unpacking python-pysnmp2 (from .../python-pysnmp2_2.0.9-2_all.deb) ...
dpkg: error processing /var/cache/apt/archives/python-pysnmp2_2.0.9-2_all.deb (--unpack):
 trying to overwrite '/usr/share/pyshared/pysnmp/__init__.py', which is also in package python-pysnmp-common 0:4.1.9a-1ubuntu0.10.04.1
E: Sub-process /usr/bin/dpkg returned an error code (1)

###########################

jsalisbury@salisbury-lucid-multi-nic:~$ dpkg -s python-pysnmp2
Package: python-pysnmp2
Status: install ok not-installed
Priority: optional
Section: python

Changed in python-pysnmp4 (Ubuntu Lucid):
status: New → Triaged
importance: Undecided → Medium
Changed in python-pysnmp4 (Ubuntu):
status: Confirmed → Fix Released
importance: Undecided → Medium
Changed in python-pysnmp4 (Ubuntu Lucid):
milestone: none → lucid-updates
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded a new version of python-pysnmp4 to lucid-proposed that adds a breaks and conflicts with python-pysnmp2.

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Accepted python-pysnmp4 into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in python-pysnmp4 (Ubuntu Lucid):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
scm (scm) wrote :

Confirmed that this now fails as expected. If I install python-pysnmp-common first, I get an error when trying to install python-pysnmp2, and if I attempt to install both at the same time, I get an error about the conflict.

# apt-get install python-pysnmp2 python-pysnmp-common
[SNIP]
Some packages could not be installed. This may mean that you have
[SNIP]
The following packages have unmet dependencies:
  python-pysnmp-common: Breaks: python-pysnmp2 (< 2.0.9-3~) but 2.0.9-2 is to be installed
E: Broken packages

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-pysnmp4 - 4.1.9a-1ubuntu0.10.04.2

---------------
python-pysnmp4 (4.1.9a-1ubuntu0.10.04.2) lucid-proposed; urgency=low

  * Make python-pysnmp-common break and replace python-pysnmp2 (<< 2.0.9-3)
    (LP: #769205)
 -- Brian Murray <email address hidden> Mon, 16 May 2011 12:57:31 -0700

Changed in python-pysnmp4 (Ubuntu Lucid):
status: Fix Committed → Fix Released
tags: added: testcase
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.