Hi Sven,
> [ ERROR ]: 09:40:23 | KiwiDebianBootstrapError: KiwiCommandError:
> chroot: stderr: dpkg-query: error: package 'ucf' is not installed
I was looking at the log file and here is what I think.
grub2 has a requirement on ucf and it is fetched as part of the
bootstrap process:
[ DEBUG ]: 09:40:16 | EXEC: [apt-get -q -c /result/build/image-root/kiwi_apt.conf -y --no-install-recommends install -oDebug::pkgDPkgPm=1 -oDPkg::Pre-Install-Pkgs::=cat >/var/tmp/kiwi_debs_cwb8gjf0 ?essential apt grub2 usrmerge]
...
The following additional packages will be installed:
... ucf ...
Get:92
http://apt-cache.internal.de:3142/debian_lff bookworm/main amd64 ucf all 3.0043+nmu1 [55.2 kB]
After the packages got downloaded we manually "install" them in the bootstrap
phase. ucf is part of that process
[ DEBUG ]: 09:40:20 | EXEC: [bash -c dpkg-deb --fsys-tarfile /var/cache/kiwi/apt-get/archives/ucf_3.0043+nmu1_all.deb | tar -C /result/build/image-root -x]
After this action ucf exists in the bootstrap root. At the end of all
this bootstrap unpacking we call the scripts of each package.
[ DEBUG ]: 09:40:23 | Running pre/post scripts for: ucf_3.0043+nmu1_all.deb
...
[ DEBUG ]: 09:40:23 | Running pre/post scripts for: grub-pc_2.06-13+deb12u1_amd64.deb
[ DEBUG ]: 09:40:23 | EXEC: [chroot /result/build/image-root /kiwi_debpost.yr1ui2u9/grub-pc_2.06-13+deb12u1_amd64.deb/postinst configure]
[ DEBUG ]: 09:40:23 | EXEC: Failed with stderr: dpkg-query: error: package 'ucf' is not installed
And here is the issue.
To me it looks like the grub2 package scripts checks via dpkg-query if ucf is
installed. At this point in the bootstrap phase the package database from an
apt/dpkg perspective is incomplete due to the way the bootstrap implementation
called apt-get and dpkg-deb --fsys-tarfile. So the tool itself, ucf would
be there and works but when you ask the package database it probably says
it's not installed. If the grub2 package would check for the ucf binary
instead of asking the package database you would probably not having this
issue.
As you need to build up a proper bootstrap root such that you can use
apt in the normal way we get a clean dpkg state only after the bootstrap
phase is done and kiwi can call apt and update the cache and install
the rest in the normal way. During bootstrap phase I assume any package
that has script code reading data from the package database has an issue.
> Is there something else I can try?
You should not put grub2 to the bootstrap phase. Install it later in
the image phase. Actually I always try to keep the boostrap empty
when building Debian based systems such that the bootstrap action
is limited to the minial required packages resolved by apt.
> Removing the "grub2" package which has ucf as a requirement opens a
> whole different can of worms.
If you have moved it to the type="image" section and you run into
other issues just send the new log file and I take a look
Regards,
Marcus
--
Public Key available via:
https://keybase.io/marcus_schaefer/key.asc
keybase search marcus_schaefer
-------------------------------------------------------
Marcus Schäfer Brunnenweg 18
Tel:
+49 7562 905437 D-88260 Argenbühl
Germany
-------------------------------------------------------