live-build tries to install non-existing packages for jammy during live-image build process
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
live-build (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
During the process of building a live image, during chroot_firmware() step which is run by default (controlled by --firmware-chroot parameter of lb config), I noticed that the build process tries to install some weird looking non-existing packages:
[2022-06-01 15:07:43] lb_chroot_
P: Begin installing packages (install pass)...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package PLUS.txt
E: Couldn't find any package by glob 'PLUS.txt'
E: Couldn't find any package by regex 'PLUS.txt'
E: Unable to locate package Pi
E: Unable to locate package Z83-4.txt
E: Couldn't find any package by glob 'Z83-4.txt'
E: Couldn't find any package by regex 'Z83-4.txt'
P: Begin unmounting filesystems...
P: Saving caches...
I started investigating this and found out that the issue happens at this line: https:/
Together with the downloaded Contents file that is stored in cache/contents.
lib/firmware/
lib/firmware/
lib/firmware/
lib/firmware/
It produces output like this:
root@189fbc849e
PLUS.txt
Pi
Z83-4.txt
admin/amd64-
admin/intel-
libs/alsa-
misc/linux-firmware
multiverse/
multiverse/
multiverse/
multiverse/
multiverse/
multiverse/
multiverse/
multiverse/
multiverse/
net/wireless-regdb
restricted/
restricted/
restricted/
restricted/
universe/
universe/
universe/
universe/
universe/
The core issue seems to be that there are unquoted spaces in the Contents file which live-build with --firmware-chroot does not expect, see the code linked above.
Steps to reproduce:
1) Install Ubuntu Jammy 22.04
2) apt-get -y install vim live-build fdisk
3) lb config --distribution jammy --debian-installer live --binary-images netboot --debconf-frontend noninteractive --chroot-filesystem squashfs --archive-areas "main restricted universe multiverse" --apt-options "--yes" --bootappend-live "keyboard-
4) lb build
If I run the lb config command (step 3) with an explicit --firmware-chroot false, the bug does not happen and I can successfully build an image.
OS: Description: Ubuntu 22.04 LTS Release: 22.04
live-build version: 3.0~a57-1ubuntu41