regression: apt.postint fails if never previously configured
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
High
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
bootstrapping a system with apt that fixes #1968154 fails in focal and bionic, as they try to execute the config file that is being removed.
This is not a problem on updates, only on new installs, so impact is limited to bootstrapping tools that enable -updates, such as mmdebstrap.
[Test case]
bootstrapping with -updates enabled can easily be tested with mmdebstrap:
mmdebstrap -v focal ~/Projects/
for example, on focal:
Setting up apt (2.0.8) ...
/var/lib/
dpkg: error processing package apt (--configure):
installed apt package post-installation script subprocess returned error exit status 127
[Regression potential]
We remove 5 lines from the shell postinst script, there could be syntax errors? But then we'd see those during upgrades, so practically none.
[Original bug report]
#1968154 removed `/etc/kernel/
https:/
...but `apt.postinst` still tries to run it:
# create kernel autoremoval blacklist on update
if dpkg --compare-versions "$2" lt 0.9.9.3; then
fi
If I understand correctly, "$2" is the most-recently-
This fails when I'm building a focal (20.04) userspace from scratch:
$ dpkg --configure -a
[...]
Setting up apt (2.0.8) ...
/var/
dpkg: error processing package apt (--configure):
installed apt package post-installation script subprocess returned error exit status 127
It works with apt 2.0.6.
tags: |
added: verification-done verification-done-focal removed: verification-needed verification-needed-focal |
Changed in apt (Ubuntu Bionic): | |
importance: | Undecided → High |
jftr: I removed this if in git commit 938889b20268ec9 2be1bff67750f7a df03f52c1b, which was shipped with 2.1.12 – that might explain why it isn't effecting releases with later versions and why it was missed.