manifest claims two packages are both installed that conflict

Bug #2036278 reported by Steve Langasek
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
livecd-rootfs (Ubuntu)
New
Undecided
Unassigned

Bug Description

Investigating LP: #2036199, found that https://cdimage.ubuntu.com/ubuntu-unity/daily-live/20230914/mantic-desktop-amd64.manifest lists grub-pc + grub-efi-amd64. This wasn't surprising as Julian has mentioned work happening in Debian to make these packages co-installable. But that work hasn't landed yet, the packages still conflict.

Yet both are listed in the manifest for the squashfs, which shouldn't be possible.

$ sudo mount /tmp/ubuntu-unity-mantic-desktop-amd64.iso /mnt/
$ sudo mount /mnt/casper/filesystem.squashfs /mnt/
$ sudo chroot /mnt dpkg -l | grep grub-pc
rc grub-pc 2.12~rc1-4ubuntu3 amd64 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 2.12~rc1-4ubuntu3 amd64 GRand Unified Bootloader, version 2 (PC/BIOS modules)
$

The fact that grub-pc was removed is a bug. The fact that a package is in removed but not purged state in the image is ALSO a bug. We should probably just assert whenever this is the case and fail the build.

Steve Langasek (vorlon)
tags: added: rls-mm-incoming
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

The bit that was confusing to me about this is that dpkg-query --show includes removed but not purged files.

tags: added: foundations-todo
removed: rls-mm-incoming
no longer affects: livecd-rootfs (Ubuntu Mantic)
Revision history for this message
Philip Roche (philroche) wrote (last edit ):

The fact grub-pc exists in the manifest is related to https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2036195 which is being verified now.

There is also a case which we have encountered in the public cloud team of `rc` packages still being present in the manifest. We resolved this by calling the following at the end of every binary hook

```
purge_removed_packages(){
  # Ensure that any packages that were removed during the build are
  # purged from the image. For example if chrony is installed it will
  # remove systemd-timesyncd, but it will not purge it leaving config-files
  # on disk and also resulting in `dpkg-query --show` listing systemd-timesyncd
  # and thus present in the package manifest despite not actually being installed.
  # purge_removed_packages will ensure that it is purged.
  MOUNTPOINT="$1"
  env DEBIAN_FRONTEND=noninteractive chroot "${MOUNTPOINT}" apt-get purge --assume-yes "?config-files"
}
```

We likely need the same in live-build/livecd-rootfs

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.