package openjdk-7-jdk 7u55-2.4.7-1ubuntu1 failed to install/upgrade: trying to overwrite '/usr/lib/jvm/java-7-openjdk-i386/', which is also in package openjdk-7-source 7u55-2.4.7-1ubuntu1

Bug #1359078 reported by Grygoriy on 2014-08-20
This bug affects 22 people
Affects Status Importance Assigned to Milestone
openjdk-7 (Ubuntu)
Matthias Klose

Bug Description

No details

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: openjdk-7-jdk 7u55-2.4.7-1ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-33.58-generic
Uname: Linux 3.13.0-33-generic i686
ApportVersion: 2.14.1-0ubuntu3.3
Architecture: i386
Date: Wed Aug 20 10:03:01 2014
DuplicateSignature: package:openjdk-7-jdk:7u55-2.4.7-1ubuntu1:trying to overwrite '/usr/lib/jvm/java-7-openjdk-i386/', which is also in package openjdk-7-source 7u55-2.4.7-1ubuntu1
ErrorMessage: trying to overwrite '/usr/lib/jvm/java-7-openjdk-i386/', which is also in package openjdk-7-source 7u55-2.4.7-1ubuntu1
InstallationDate: Installed on 2014-03-28 (144 days ago)
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release i386 (20120817.3)
SourcePackage: openjdk-7
Title: package openjdk-7-jdk 7u55-2.4.7-1ubuntu1 failed to install/upgrade: trying to overwrite '/usr/lib/jvm/java-7-openjdk-i386/', which is also in package openjdk-7-source 7u55-2.4.7-1ubuntu1
UpgradeStatus: Upgraded to trusty on 2014-08-13 (6 days ago)

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

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

Changed in openjdk-7 (Ubuntu):
status: New → Confirmed
Adrian Wilkins (adrian-wilkins) wrote :

So, the packaging situation is a bit muddy here.

I have previously manually created a softlink from

    /usr/lib/jvm/java-7-openjdk-amd64/src/zip -> ../java-7-openjdk-i386/src/zip

Because the "source" package (which is basically necessary for a useful debugging environment in Eclipse, etc), puts the archive in the i386 folder... even through source is platform-independent.

Eclipse expects to find in the root of the JDK by default, hence the softlink. Also submitted bugs to the effect that the packaging should change to put the source in a platform-independant location and softlink to the archive in the appropriate platform-dependent locations. Perhaps a half-baked version of this is what's occurring. I note the new folder `openjdk-7` is now the new location of the archive and there is an appropriate softlink in the amd64 folder.

Inspecting the packages...

openjdk-7-jdk :

This package now includes
   /usr/lib/jvm/java-7-openjdk-amd64/ (a link to the source)

billhuey (bill-huey) wrote :
Changed in openjdk-7 (Ubuntu):
status: Confirmed → Fix Committed
assignee: nobody → billhuey (bill-huey)
status: Fix Committed → Fix Released
billhuey (bill-huey) wrote :

Looks like this fixed in the latest debian release but not Ubuntu yet. Looks like I need update the current ubuntu package to that revision

Andreas Holley (andy-duks) wrote :

This is marked as fix released, however I am unable to install any packages on Ubuntu 14.04 due to this problem, it says to run apt-get -f install but this does not work, and I can't even uninstall the affected package (openjdk-7-jdk)

billhuey (bill-huey) wrote :

I'll take another look

Steve Langasek (vorlon) wrote :


The issue here is that the version of openjdk-7 in trusty ships /usr/lib/jvm/java-7-openjdk-i386/ in the openjdk-7-source binary package, and the version of openjdk-7 in both trusty-updates and utopic ships that file in the openjdk-7-jdk binary package:

$ zgrep usr/lib/jvm/java-7-openjdk-i386/ ~/ubuntu/dists/trusty/Contents-i386.gz
usr/lib/jvm/java-7-openjdk-i386/ java/openjdk-7-source
$ zgrep usr/lib/jvm/java-7-openjdk-i386/ ~/ubuntu/dists/trusty-updates/Contents-i386.gz
usr/lib/jvm/java-7-openjdk-i386/ java/openjdk-7-jdk
$ zgrep usr/lib/jvm/java-7-openjdk-i386/ ~/ubuntu/dists/utopic/Contents-i386.gz
usr/lib/jvm/java-7-openjdk-i386/ java/openjdk-7-jdk

When files move between packages, this needs to be declared with a Replaces: field (see ubuntu policy).

Neither the utopic nor the trusty-proposed versions of openjdk-7-jdk declare a Replaces against the versions of openjdk-7-source that previously ship this file:

$ dpkg -I ~/ubuntu/pool/main/o/openjdk-7/openjdk-7-jdk_7u65-2.5.2-3~14.04_i386.deb |grep Replaces
$ dpkg -I ~/ubuntu/pool/main/o/openjdk-7/openjdk-7-jdk_7u65-2.5.2-4_i386.deb |grep Replaces

If this is a deliberate move of the file between packages, then you need to declare this in debian/control.

Changed in openjdk-7 (Ubuntu):
status: Fix Released → Triaged
Steve Langasek (vorlon) wrote :

Looking at the history in Debian bug #755126, it appears that it was not the intent to move the symlink from the -source package to the -jdk package. So rather than introducing the Replaces:, it seems the package still needs fixed (in both trusty-updates and in utopic) to put the symlink in the correct file.

Steve Langasek (vorlon) wrote :

(in the correct package, I mean)

Changed in openjdk-7 (Ubuntu):
importance: Undecided → High
Jamie Strandboge (jdstrand) wrote :

Per doko, this should be fixed in 15.04 now and will be fixed in the next upload for stable releases.

Changed in openjdk-7 (Ubuntu):
assignee: billhuey (bill-huey) → Matthias Klose (doko)
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers