multiarch broke circular dependency workaround

Bug #962378 reported by Marc Deslauriers on 2012-03-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ca-certificates-java (Ubuntu)
High
Marc Deslauriers

Bug Description

The postinst tries to call "java" without it being available...

root@sec-precise-amd64:/etc# apt-get install ca-certificates-java
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.2.0-18-generic linux-headers-3.2.0-18 linux-headers-3.2.0-19
  linux-headers-3.2.0-19-generic libtelepathy-farstream1 gtk2-engines-pixbuf
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  icedtea-6-jre-cacao icedtea-6-jre-jamvm java-common libnss3-1d
  openjdk-6-jre-headless openjdk-6-jre-lib tzdata-java
Suggested packages:
  default-jre equivs sun-java6-fonts ttf-dejavu-extra fonts-ipafont-gothic
  fonts-ipafont-mincho ttf-telugu-fonts ttf-oriya-fonts ttf-kannada-fonts
  ttf-bengali-fonts
The following NEW packages will be installed:
  ca-certificates-java icedtea-6-jre-cacao icedtea-6-jre-jamvm java-common
  libnss3-1d openjdk-6-jre-headless openjdk-6-jre-lib tzdata-java
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 32.6 MB of archives.
After this operation, 88.1 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.ubuntu.com/ubuntu/ precise/main openjdk-6-jre-lib all 6b24-1.11.1-3ubuntu3 [6,134 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ precise/main libnss3-1d amd64 3.13.1.with.ckbi.1.88-1ubuntu6 [13.4 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ precise/main ca-certificates-java all 20110912ubuntu4 [8,080 B]
Get:4 http://archive.ubuntu.com/ubuntu/ precise/main tzdata-java all 2012b-1 [134 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ precise/main java-common all 0.43ubuntu2 [61.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ precise/main openjdk-6-jre-headless amd64 6b24-1.11.1-3ubuntu3 [25.3 MB]
Get:7 http://archive.ubuntu.com/ubuntu/ precise/main icedtea-6-jre-cacao amd64 6b24-1.11.1-3ubuntu3 [419 kB]
Get:8 http://archive.ubuntu.com/ubuntu/ precise/main icedtea-6-jre-jamvm amd64 6b24-1.11.1-3ubuntu3 [510 kB]
Fetched 32.6 MB in 1min 41s (322 kB/s)
Selecting previously unselected package openjdk-6-jre-lib.
(Reading database ... 207768 files and directories currently installed.)
Unpacking openjdk-6-jre-lib (from .../openjdk-6-jre-lib_6b24-1.11.1-3ubuntu3_all.deb) ...
Selecting previously unselected package libnss3-1d.
Unpacking libnss3-1d (from .../libnss3-1d_3.13.1.with.ckbi.1.88-1ubuntu6_amd64.deb) ...
Selecting previously unselected package ca-certificates-java.
Unpacking ca-certificates-java (from .../ca-certificates-java_20110912ubuntu4_all.deb) ...
Selecting previously unselected package tzdata-java.
Unpacking tzdata-java (from .../tzdata-java_2012b-1_all.deb) ...
Selecting previously unselected package java-common.
Unpacking java-common (from .../java-common_0.43ubuntu2_all.deb) ...
Selecting previously unselected package openjdk-6-jre-headless.
Unpacking openjdk-6-jre-headless (from .../openjdk-6-jre-headless_6b24-1.11.1-3ubuntu3_amd64.deb) ...
Selecting previously unselected package icedtea-6-jre-cacao.
Unpacking icedtea-6-jre-cacao (from .../icedtea-6-jre-cacao_6b24-1.11.1-3ubuntu3_amd64.deb) ...
Selecting previously unselected package icedtea-6-jre-jamvm.
Unpacking icedtea-6-jre-jamvm (from .../icedtea-6-jre-jamvm_6b24-1.11.1-3ubuntu3_amd64.deb) ...
Processing triggers for doc-base ...
Processing 2 added doc-base files...
Registering documents with scrollkeeper...
Processing triggers for man-db ...
Setting up libnss3-1d (3.13.1.with.ckbi.1.88-1ubuntu6) ...
Setting up tzdata-java (2012b-1) ...
Setting up java-common (0.43ubuntu2) ...
Setting up ca-certificates-java (20110912ubuntu4) ...
/var/lib/dpkg/info/ca-certificates-java.postinst: line 51: java: command not found
done.
Setting up openjdk-6-jre-headless (6b24-1.11.1-3ubuntu3) ...
update-alternatives: using /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/keytool to provide /usr/bin/keytool (keytool) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/pack200 to provide /usr/bin/pack200 (pack200) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/rmid to provide /usr/bin/rmid (rmid) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/rmiregistry to provide /usr/bin/rmiregistry (rmiregistry) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/unpack200 to provide /usr/bin/unpack200 (unpack200) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/orbd to provide /usr/bin/orbd (orbd) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/servertool to provide /usr/bin/servertool (servertool) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/tnameserv to provide /usr/bin/tnameserv (tnameserv) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode.
Setting up icedtea-6-jre-cacao (6b24-1.11.1-3ubuntu3) ...
Setting up icedtea-6-jre-jamvm (6b24-1.11.1-3ubuntu3) ...
Setting up openjdk-6-jre-lib (6b24-1.11.1-3ubuntu3) ...

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: ca-certificates-java 20110912ubuntu4
ProcVersionSignature: User Name 3.2.0-20.32-generic 3.2.12
Uname: Linux 3.2.0-20-generic x86_64
ApportVersion: 1.94.1-0ubuntu2
Architecture: amd64
Date: Thu Mar 22 13:35:54 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120220)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ca-certificates-java
UpgradeStatus: No upgrade log present (probably fresh install)

Marc Deslauriers (mdeslaur) wrote :
Marc Deslauriers (mdeslaur) wrote :

ca-certificates-java and openjdk-6-jre-headless have circular dependencies

Marc Deslauriers (mdeslaur) wrote :

The ca-certificates-java postinst tries to work around the circular dependency with the following:

setup_path()
{
    for jvm in java-6-openjdk java-7-openjdk java-6-sun; do
 if [ -x /usr/lib/jvm/$jvm/bin/java ]; then
     break
 fi
    done
    export JAVA_HOME=/usr/lib/jvm/$jvm
    PATH=$JAVA_HOME/bin:$PATH

    CLASSPATH=/usr/share/ca-certificates-java
    export CLASSPATH
}

but in precise, the paths have changed because of multiarch:

java-6-openjdk-amd64 instead of java-6-openjdk

summary: - ca-certificates-java tries to call "java" binary before it's installed
+ multiarch broke circular dependency workaround
Changed in ca-certificates-java (Ubuntu):
milestone: none → ubuntu-12.04-beta-2
assignee: nobody → Canonical Foundations Team (canonical-foundations)
importance: Undecided → High
status: New → Confirmed
tags: added: rls-p-tracking
Changed in ca-certificates-java (Ubuntu):
assignee: Canonical Foundations Team (canonical-foundations) → Marc Deslauriers (mdeslaur)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ca-certificates-java - 20110912ubuntu6

---------------
ca-certificates-java (20110912ubuntu6) precise; urgency=low

  * debian/postinst: also look for jvm in multiarch locations (LP: #962378)
  * debian/postinst: retrigger first_install to properly get cert store.
 -- Marc Deslauriers <email address hidden> Fri, 23 Mar 2012 11:28:00 -0400

Changed in ca-certificates-java (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers