If fonts-ubuntu isn't installed, the initramfs plymouth hook fails at fc-cache

Bug #2012762 reported by feren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
plymouth (Ubuntu)
Triaged
Low
Unassigned

Bug Description

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 abort, causing the update-initramfs command to 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 other packages such as 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"

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

feren (ferenos)
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote :

Out of interest, what plymouth theme do you have configured? Because if you have ubuntu-text or text configured, this code does not execute; and if you have one of the other Ubuntu-provided themes installed, you have plymouth-label, which depends on fonts-ubuntu.

So this is a bug, but looks to be low-priority.

Changed in plymouth (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
feren (ferenos) wrote :

A custom Plymouth theme that is not any of the default themes.

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.