Package: dpkg
Version: 1.17.23
Severity: serious
Hello,
[ Reported as RC because it could make packages fail to install
correctly, but I don't have an instance in Debian handy, so feel free
to downgrade ]
Since commit 9ee62ecfc8937f24a82805a424564997042dd984 ("Make the initial
dependtry be 1 instead of 0"), dpkg will in some circumstances configure
the dependencies of a package *after* configuring the package itself.
I noticed this in Ubuntu where we have a package "floodlight" which has
Depends on default-jre-headless and tries to use /usr/bin/java, which is
set up in the postinst of openjdk-7-jre-headless using alternatives.
openjdk-7-jre-headless is being configured after floodlight, meaning
that this fails. Here's the log
https://jenkins.qa.ubuntu.com/job/vivid-adt-floodlight/15/ARCH=amd64,label=adt/console
You should see "start/started" after floodlight is configured, not
"start/pre-start". The error reveals itself in the log files on the
system.
Attached is an equivs control file that you can use to reproduce this on
Debian. It's not minimal, but was enough for me to be able to bisect it
down to the commit identified. A way to reproduce is like this (ignore
vivid, that's the name of the host):
(sid-amd64)root@vivid:/# dpkg --version
Debian `dpkg' package management program version 1.17.23 (amd64).
[…]
(sid-amd64)root@vivid:/# apt-cache show foo
[…]
Depends: default-jre-headless | java6-runtime-headless
(sid-amd64)root@vivid:/# apt-cache show default-jre-headless
[…]
Depends: openjdk-7-jre-headless (>= 7~u3-2.1.1), […]
[…]
(sid-amd64)root@vivid:/# apt-get install --no-install-recommends foo
[…]
Setting up foo (1.0) ...
Setting up openjdk-7-jre-headless:amd64 (7u71-2.5.3-2) ...
(-headless is configured after foo which transitively depends on it)
And you can reproduce like this, once you've got the dependencies
installed
(sid-amd64)root@vivid:/# dpkg --unpack --auto-deconfigure
/var/cache/apt/archives/default-jre-headless_2%3a1.7-52_amd64.deb
/var/cache/apt/archives/ca-certificates-java_20140324_all.deb
/var/cache/apt/archives/openjdk-7-jre-headless_7u71-2.5.3-2_amd64.deb
/var/cache/apt/archives/foo_1.0_all.deb
[…]
(sid-amd64)root@vivid:/# dpkg --configure openjdk-7-jre-headless:amd64
ca-certificates-java:all default-jre-headless:amd64 foo:all
Setting up default-jre-headless (2:1.7-52) ...
Setting up foo (1.0) ...
Setting up openjdk-7-jre-headless:amd64 (7u71-2.5.3-2) ...
Setting up ca-certificates-java (20140324) ...
[…]
Let me know if you need any more info, like debugging output.
(If a solution isn't immediately apparent, is this commit safe to revert
for the time being?)
Cheers,
--
Iain Lane [ [email protected] ]
Debian Developer [ [email protected] ]
Ubuntu Developer [ [email protected] ]
### Commented entries have reasonable defaults.
### Uncomment to edit them.
# Source: <source package name; defaults to package name>
Section: misc
Priority: optional
# Homepage: <enter URL here; no default>
Standards-Version: 3.9.2
Package: foo
# Version: <enter version here; defaults to 1.0>
# Maintainer: Your Name <[email protected]>
# Pre-Depends: <comma-separated list of packages>
Depends: default-jre-headless | java6-runtime-headless
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
# Provides: <comma-separated list of packages>
# Replaces: <comma-separated list of packages>
# Architecture: all
# Copyright: <copyright file; defaults to GPL2>
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files for the doc directory>
# Files: <pair of space-separated paths; First is file to include, second is
destination>
# <more pairs, if there's more than one file to include. Notice the starting
space>
Description: <short description; defaults to some wise words>
long description and info
.
second paragraph