package gdb-msp430 7.2~mspgcc-7.2-20110612-1 failed to install/upgrade: trying to overwrite '/usr/share/gdb/python/gdb/__init__.py', which is also in package gdb 7.3-0ubuntu2

Bug #860045 reported by richard mullens on 2011-09-26
546
This bug affects 95 people
Affects Status Importance Assigned to Milestone
gdb (Ubuntu)
Undecided
Unassigned
gdb-msp430 (Ubuntu)
Undecided
Unassigned

Bug Description

lsb_release -rd
Description: Ubuntu oneiric (development branch)
Release: 11.10

apt-cache policy gdb-msp430
gdb-msp430:
  Installed: 7.2~mspgcc-7.2-20110612-1
  Candidate: 7.2~mspgcc-7.2-20110612-1ubuntu1
  Version table:
     7.2~mspgcc-7.2-20110612-1ubuntu1 0
        500 http://gb.archive.ubuntu.com/ubuntu/ oneiric/universe i386 Packages
 *** 7.2~mspgcc-7.2-20110612-1 0
        100 /var/lib/dpkg/status

I expected gdb-msp430 the be upgraded

Instead I got an error message and a prompt to report the problem and supply this information

Doing the simplest things with the Unity interface is so fiddly - even switching workspaces is awkward !!

ProblemType: Package
DistroRelease: Ubuntu 11.10
Package: gdb-msp430 7.2~mspgcc-7.2-20110612-1
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic i686
ApportVersion: 1.23-0ubuntu1
AptOrdering:
 gdb-msp430: Install
 gdb-msp430: Configure
Architecture: i386
Date: Mon Sep 26 21:52:25 2011
DpkgTerminalLog:
 Preparing to replace gdb-msp430 7.2~mspgcc-7.2-20110612-1 (using .../gdb-msp430_7.2~mspgcc-7.2-20110612-1ubuntu1_i386.deb) ...
 Unpacking replacement gdb-msp430 ...
 dpkg: error processing /var/cache/apt/archives/gdb-msp430_7.2~mspgcc-7.2-20110612-1ubuntu1_i386.deb (--unpack):
  trying to overwrite '/usr/share/gdb/python/gdb/__init__.py', which is also in package gdb 7.3-0ubuntu2
DuplicateSignature:
 Unpacking replacement gdb-msp430 ...
 dpkg: error processing /var/cache/apt/archives/gdb-msp430_7.2~mspgcc-7.2-20110612-1ubuntu1_i386.deb (--unpack):
  trying to overwrite '/usr/share/gdb/python/gdb/__init__.py', which is also in package gdb 7.3-0ubuntu2
ErrorMessage: trying to overwrite '/usr/share/gdb/python/gdb/__init__.py', which is also in package gdb 7.3-0ubuntu2
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110901)
SourcePackage: gdb-msp430
Title: package gdb-msp430 7.2~mspgcc-7.2-20110612-1 failed to install/upgrade: trying to overwrite '/usr/share/gdb/python/gdb/__init__.py', which is also in package gdb 7.3-0ubuntu2
UpgradeStatus: No upgrade log present (probably fresh install)

tags: removed: need-duplicate-check
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gdb-msp430 (Ubuntu):
status: New → Confirmed

The package tries to overwrite:
/usr/share/gdb/python/gdb/__init__.py
/usr/share/gdb/python/gdb/types.py
/usr/share/gdb/python/gdb/printing.py
/usr/share/gdb/python/gdb/command/__init__.py
/usr/share/gdb/python/gdb/command/pretty_printers.py

These files are identical (in my case) to the ones already installed so to work around the problem I ran the installation with an override instead:
sudo apt-get -o Dpkg::Options::="--force-overwrite" install gdb-msp430

cousteau (cousteaulecommandant) wrote :

12.04, same bug. Either the /usr/share/gdb directory should be renamed to /usr/share/gdb-msp430 (and the program recompiled to use the new path) or just removed from the gdb-msp430 package and make gdb a dependency (or a recommend) of gdb-msp430.

cousteau (cousteaulecommandant) wrote :

Steps to reproduce:
(1) sudo apt-get install gdb # in case you don't have it already installed
(2) sudo apt-get install gdb-msp430

By the way, if someone is in a hurry and needs to install gdb-msp430, it can be done if gdb is uninstalled.

I've decided the problem by patching the debianization

in debian/rules find

 # Remove conflicting and empty files
 rm -rf debian/$(PACKAGE)/usr/share/gdb/syscalls
 rm -rf debian/$(PACKAGE)/usr/share/locale
 rm -rf debian/$(PACKAGE)/usr/share/info
 rm -rf debian/$(PACKAGE)/usr/lib/*iberty*

and add there:

 rm -rf debian/$(PACKAGE)/usr/share/gdb/python

BTW there is some more problems exists (it is not strictly linked with gdb-source package version, so using gdb-7.4 is ok for prerequisites, but failed by the fact, and so, more patching necessary.

tags: added: precise
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gdb (Ubuntu):
status: New → Confirmed

I'm of the Mint13 breed and I too get
E: /var/cache/apt/arE: /var/cache/apt/archives/gdb-msp430_7.2~mspgcc-7.2-20110612-1ubuntu1_amd64.deb: trying to overwrite '/usr/share/gdb/python/gdb/__init__.py', which is also in package gdb 7.4-2012.04-0ubuntu2 chives/gdb-msp430_7.2~mspgcc-7.2-20110612-1ubuntu1_amd64.deb: trying to overwrite '/usr/share/gdb/python/gdb/__init__.py', which is also in package gdb 7.4-2012.04-0ubuntu2
I'll give the force suggestion a try. Ian.

Hans Joachim Desserud (hjd) wrote :

While testing, I noticed that gdb and gdb-msp430 are in conflict in Ubuntu 12.04, but from what I can see both packages can be installed side-by-side on 12.10 (and presumably later). Not sure what sorted out the issue though, and whether the fix is fit for an SRU, though.

Bracken (abdawson) wrote :

Hans, they both try to install one file to the same location, I can't remember what. I just upgraded to 12.10 to get round it, on 13.04 now.

Hans Joachim Desserud (hjd) wrote :

BigglesPiP: Sorry about the delay. Yes, the problem is that both packages try to write to the same location. However the fix for this can come in various different ways, for instance removing the file from either package, moving it or placing the content in some package-separate place. And without knowing how it was resolved, it is hard to tell whether (or even which of) the packages can be updated in 12.04. So someone should investigate how this was fixed, and whether/how that fix can be included in 12.04. Hope this clarifies things. :)

Matthias Klose (doko) wrote :

fixed in 14.04 LTS

Changed in gdb-msp430 (Ubuntu):
status: Confirmed → Fix Released
Changed in gdb (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.