pbuilder: remove_packages() checks for existence in host, not in chroot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pbuilder (Debian) |
Fix Released
|
Unknown
|
|||
pbuilder (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Yakkety |
Fix Released
|
High
|
Unassigned |
Bug Description
The fix:
https:/
[Impact]
The remove_packages() function in pbuilder-modules contains:
if (dpkg -s "$pkg" 2>&1)>/dev/null ; then
This obviously must
if ($CHROOTEXEC dpkg -s "$pkg" 2>&1)>/dev/null ; then
This causes remove_packages() to try to remove packages that are not present, actually making the function not working at all in some circumstances, leading to crashes; or anyway, it causes it to try to remove packages from the chroot even when they are not there.
[Test Case]
2 ways:
1)
* get a sarge chroot, or anyway around that time
* assuming you have pbuilder installed on the host and not in the chroot,
run:
pbuilder u --removepackages pbuilder
* pbuilder crashes
2)
* get a regular chroot of something common these days
* run `pbuilder u --removepackages pbuilder`
* notice how it tries to remove pbuilder from inside the chroot (it
shouldn't even try)
[Regression Potential]
* for yakkety, no potential regression, this is a targeted fix.
description: | updated |
description: | updated |
Changed in pbuilder (Debian): | |
status: | Unknown → Fix Committed |
Changed in pbuilder (Debian): | |
status: | Fix Committed → Fix Released |
Changed in pbuilder (Ubuntu): | |
importance: | Undecided → High |
Changed in pbuilder (Ubuntu Yakkety): | |
importance: | Undecided → High |
Changed in pbuilder (Ubuntu): | |
status: | New → Fix Released |
Changed in pbuilder (Ubuntu Yakkety): | |
status: | New → In Progress |
tags: |
added: verification-done removed: verification-needed |
here is a debdiff of the thing uploaded to yakkety.