Comment 0 for bug 1974456

Revision history for this message
David Röthlisberger (drothlis) wrote :

#1968154 removed `/etc/kernel/postinst.d/apt-auto-removal` in this patch:
https://git.launchpad.net/ubuntu/+source/apt/commit/?id=f9d2d993687c0d5223c241956ef6a0aabcf15bf0

...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
        /etc/kernel/postinst.d/apt-auto-removal
    fi

If I understand correctly, "$2" is the most-recently-configured-version, and if it's empty `dpkg --compare-versions lt` will evaluate to true.

This fails when I'm building a focal (20.04) userspace from scratch:

    $ dpkg --configure -a
    [...]
    Setting up apt (2.0.8) ...
    /var/lib/dpkg/info/apt.postinst: 65: /etc/kernel/postinst.d/apt-auto-removal: not found
    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.