I could replicate it on my system, I got the following message on the
tests:

W: APT had planned for dpkg to do more than it reported back (0 vs 4).
   Affected packages: linux-image-4.10.0-22-generic:amd64


== Reproducer ==

$ sudo tee /etc/kernel/postinst.d/zz-fail <<EOF
#!/bin/sh -e

# Avoid running multiple times
if [ -n "$DEB_MAINT_PARAMS" ]; then
    eval set -- "$DEB_MAINT_PARAMS"
    if [ -z "$1" ] || [ "$1" != "configure" ]; then
        exit 0
    fi
fi

exit 1
EOF

$ sudo apt-get --reinstall install linux-image-$(uname -r)
$ sudo sed -i 's:exit 1:exit 0:' /etc/kernel/postinst.d/zz-fail
$ sudo apt-get upgrade

== Notes ==

To get a clearer log, run 'apt-get upgrade' before trying the
reproducer, otherwise apt output might be clobbered by other package
installs - the warning should still be there though, just with different
numbers.

There might be additional interaction between other scripts in my 
/etc/kernel/postinst.d directory. I have the following installed:
$ dpkg -S $(find /etc/kernel/postinst.d/)
update-notifier-common, apt, unattended-upgrades, dkms, initramfs-tools, 
grub-legacy-ec2, grub-pc, sicherboot: /etc/kernel/postinst.d
initramfs-tools: /etc/kernel/postinst.d/initramfs-tools
apt: /etc/kernel/postinst.d/apt-auto-removal
grub-pc: /etc/kernel/postinst.d/zz-update-grub
update-notifier-common: /etc/kernel/postinst.d/update-notifier
grub-legacy-ec2: /etc/kernel/postinst.d/x-grub-legacy-ec2
unattended-upgrades: /etc/kernel/postinst.d/unattended-upgrades
dkms: /etc/kernel/postinst.d/dkms
diversion by sicherboot from: /etc/kernel/postinst.d/dracut
diversion by sicherboot to: /etc/kernel/postinst.d/dracut.SecureBoot
sicherboot: /etc/kernel/postinst.d/dracut
dpkg-query: no path found matching pattern 
/etc/kernel/postinst.d/zz-update-bootctl

The last one is my own custom script.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1647638

Title:
  W: APT had planned for dpkg to do more than it reported back

Status in apt package in Ubuntu:
  Confirmed

Bug description:
  I noticed that base-files was not completely installed and meant to
  fix it with "sudo apt-get install --reinstall base-files". This
  resulted in the following output.

  $ LANG=C sudo apt-get install --reinstall base-files
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  The following packages were automatically installed and are no longer 
required:
    linux-headers-4.9.0-4 linux-headers-4.9.0-4-generic 
linux-image-4.9.0-4-generic linux-image-extra-4.9.0-4-generic
  Use 'sudo apt autoremove' to remove them.
  0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 13 not upgraded.
  Need to get 0 B/56,9 kB of archives.
  After this operation, 0 B of additional disk space will be used.
  (Reading database ... 598721 files and directories currently installed.)
  Preparing to unpack .../base-files_9.6ubuntu8_amd64.deb ...
  Unpacking base-files (9.6ubuntu8) over (9.6ubuntu8) ...
  Setting up base-files (9.6ubuntu8) ...
  Processing triggers for install-info (6.3.0.dfsg.1-1) ...
  Processing triggers for cracklib-runtime (2.9.2-3) ...
  Processing triggers for plymouth-theme-ubuntu-gnome-text (16.10.5) ...
  update-initramfs: deferring update (trigger activated)
  Processing triggers for man-db (2.7.5-2) ...
  Processing triggers for initramfs-tools (0.125ubuntu8) ...
  update-initramfs: Generating /boot/initrd.img-4.9.0-8-generic
  W: APT had planned for dpkg to do more than it reported back (4 vs 6).
     Affected packages: base-files:amd64

  
  $ lsb_release -a
  No LSB modules are available.
  Distributor ID:       Ubuntu
  Description:  Ubuntu Zesty Zapus (development branch)
  Release:      17.04
  Codename:     zesty

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to