Comment 0 for bug 2012762

Revision history for this message
feren (ferenos) wrote :

If you remove fonts-ubuntu from your system, or never have said package installed in the first place, and have plymouth installed, and try to `update-initramfs`, the hook at /usr/share/initramfs-tools/hooks/plymouth will exit code 1, causing the former to also fail.
While semi-unrelated, in the case of an APT operation triggering initramfs-tools, this would also lead to package management failure (which can cause an endless loop of package management failure as APT may attempt, and fail, to run update-initramfs before it ever tries to install fonts-ubuntu).

The script fails at line 147, fc-cache, and removing the output disabling contents at the end of the command reveals that it fails to read /usr/share/fonts - upon further inspection /usr/share/fonts indeed never exists, with these conditions in effect, inside the initramfs being created.

It appears that having fonts-ubuntu installed leads to a mkdir command right before that command, which only runs if the Ubuntu fonts exist, creating /usr/share/fonts while it's in the process of creating a directory to copy those fonts to.

This can be fixed by adding this command underneath 'mkdir -p "${DESTDIR}/usr/local/share/fonts"':
mkdir -p "${DESTDIR}/usr/share/fonts"

It wouldn't clash with the aforementioned Ubuntu-fonts-only mkdir as it would run before it.

Ubuntu version: 22.04.2
plymouth version: 0.9.5+git20211018-1ubuntu3