This is causing me trouble 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.

I think it's because the patch[1] removes `/etc/kernel/postinst.d/apt-
auto-removal`:

    diff --git a/debian/rules b/debian/rules
    index 7997739..8a110f7 100755
    --- a/debian/rules
    +++ b/debian/rules
    @@ -29,7 +29,6 @@ override_dh_install-arch:
        dh_install -papt -Xmethods/curl -Xmethods/curl+https -Xmethods/curl+http
        dh_install --remaining
        install -m 644 debian/apt.conf.autoremove 
debian/apt/etc/apt/apt.conf.d/01autoremove
    -   install -m 755 debian/apt.auto-removal.sh 
debian/apt/etc/kernel/postinst.d/apt-auto-removal
     
     override_dh_gencontrol:
        dh_gencontrol -- -Vapt:keyring="$(shell ./vendor/getinfo 
keyring-package)"

...but `apt.postinst` still contains this:

    # 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

Since I'm building this from scratch, "$2" (the most-recently-
configured-version) is empty, and `dpkg --compare-versions lt` returns
true.


[1]: 
https://git.launchpad.net/ubuntu/+source/apt/commit/?id=f9d2d993687c0d5223c241956ef6a0aabcf15bf0

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1968154

Title:
  Only keep 2 kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1968154/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to