[Piuparts-devel] Bug#778526: piuparts: packages with Pre-Dependencies fail to properly install/test
Michael Prokop
mika at debian.org
Mon Feb 16 10:02:18 UTC 2015
Package: piuparts
Version: 0.62~bpo70+1
Severity: normal
piuparts basically does a "dpkg -i $package" followed by "apt-get
-yf install" when installing the Debian package under test and
trying to resolve its dependencies.
This basically works fine, unless the package under test has a
Pre-Dependency on another package. Then "dpkg -i $package" doesn't
install the package at all. It fails with 'pre-dependency problem -
not installing'. piuparts then ignores this failure and executes
'apt-get -yf install' but this doesn't solve it because the previous
dpkg command didn't actually do anything.
I've created a minimal working example to provide further details
step 1) is a minimal Debian package implementing such a Pre-Depends and
step 2) is an actual piuparts run (see below).
One possible workaround would be to execute dpkg using
`--force-depends`, though this might leave the package in an
inconsistent state. A better solution would be to have a real™
dependency resolver in place.
regards,
-mika-
,---- [ 1) build a minimal demonstration package ]
| % cat debian/control
| Source: foobar
| Maintainer: Michael Prokop <nospam at example.org>
| Build-Depends: debhelper (>= 9)
| Standards-Version: 3.9.6
|
| Package: foobar
| Architecture: all
| Pre-Depends: vim
| Depends: ${misc:Depends}, ${shlibs:Depends}
| Description: ignore
| % cat debian/changelog
| foobar (0.0.1) unstable; urgency=low
|
| * Demo package
|
| -- Michael Prokop <nospam at example.org> Thu, 12 Feb 2015 12:57:42 +0100
|
| % cat debian/rules
| #!/usr/bin/make -f
| %:
| dh $@
| % cat debian/compat
| 9
| % fakeroot ./debian/rules binary
`----
,---- [ 2) demonstration run ]
| # piuparts --distribution=wheezy --mirror=http://http.debian.net/debian ./foobar_0.0.1_all.deb
| [...]
| 0m0.0s DUMP:
| new debian package, version 2.0.
| size 984 bytes: control archive=400 bytes.
| 152 bytes, 7 lines control
| 68 bytes, 1 lines md5sums
| Package: foobar
| Version: 0.0.1
| Architecture: all
| Maintainer: Michael Prokop <nospam at example.org>
| Installed-Size: 1
| Pre-Depends: vim
| Description: ignore
| 0m0.0s DEBUG: Command ok: ['dpkg', '--info', './foobar_0.0.1_all.deb']
| 0m0.0s DEBUG: Created temporary directory /tmp/tmpvb1NGO
| 0m0.0s DEBUG: Setting up minimal chroot for wheezy at /tmp/tmpvb1NGO.
| 0m0.0s DEBUG: Starting command: ['debootstrap', '--variant=minbase', '--keyring=/usr/share/keyrings/debian-archive-keyring.gpg', '--include=eatmydata', '--components=main,contrib,non-free', 'wheezy', '/tmp/tmpvb1NGO', 'http://http.debian.net/debian']
| 1m56.5s DUMP:
| I: Retrieving Release
| I: Retrieving Release.gpg
| [...]
| 2m3.4s DEBUG: Copying ./foobar_0.0.1_all.deb to /tmp/tmpvb1NGO/tmp
| 2m3.4s DEBUG: Starting command: ['chroot', '/tmp/tmpvb1NGO', 'eatmydata', 'dpkg', '-i', 'tmp/foobar_0.0.1_all.deb']
| 2m3.4s DUMP:
| Selecting previously unselected package foobar.
| dpkg: regarding tmp/foobar_0.0.1_all.deb containing foobar, pre-dependency problem:
| foobar pre-depends on vim
| vim is not installed.
|
| dpkg: error processing tmp/foobar_0.0.1_all.deb (--install):
| pre-dependency problem - not installing foobar
| Errors were encountered while processing:
| tmp/foobar_0.0.1_all.deb
| 2m3.4s DEBUG: Command failed (status=1), but ignoring error: ['chroot', '/tmp/tmpvb1NGO', 'eatmydata', 'dpkg', '-i', 'tmp/foobar_0.0.1_all.deb']
| 2m3.4s DEBUG: Starting command: ['chroot', '/tmp/tmpvb1NGO', 'eatmydata', 'apt-get', '-yf', 'install']
| 2m5.3s DUMP:
| Reading package lists...
| Building dependency tree...
| 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
| 2m5.3s DEBUG: Command ok: ['chroot', '/tmp/tmpvb1NGO', 'eatmydata', 'apt-get', '-yf', 'install']
| 2m5.3s DEBUG: Starting command: ['chroot', '/tmp/tmpvb1NGO', 'eatmydata', 'dpkg-query', '-f', '${Package} ${Status}\n', '-W', 'foobar']
| 2m5.4s DUMP:
| foobar install ok not-installed
| 2m5.4s DEBUG: Command ok: ['chroot', '/tmp/tmpvb1NGO', 'eatmydata', 'dpkg-query', '-f', '${Package} ${Status}\n', '-W', 'foobar']
| 2m5.4s ERROR: Installation of foobar failed
| 2m5.4s ERROR: Could not install foobar.
| 2m5.6s DEBUG: Starting command: ['chroot', '/tmp/tmpvb1NGO', 'eatmydata', 'umount', '/proc']
| 2m5.6s DEBUG: Command ok: ['chroot', '/tmp/tmpvb1NGO', 'eatmydata', 'umount', '/pr
`----
More information about the Piuparts-devel
mailing list