#803995 grub-common: Caching background image conceals original filename when updating

Package:
grub-common
Source:
grub2
Description:
GRand Unified Bootloader (common files)
Submitter:
Julian Calaby
Date:
2015-11-04 02:03:05 UTC
Severity:
minor
#803995#5
Date:
2015-11-04 02:01:36 UTC
From:
To:
Dear Maintainer,

I use grub to boot Debian off an encrypted disk and as grub doesn't understand LUKS encrypted volumes, 05_debian_theme caches the background image in /boot/grub. It then prints the name of the background image, however the caching mechanism overwrites the first argument of set_background_image(), so it emits:

Found background image: .background_cache.png

instead of

Found background image: /usr/share/images/desktop-base/desktop-grub.png

Which is obviously wrong.

The first patch adds a new variable in Step #5 of set_background_image() to store the original name of the background file and uses it in Step #7.

I thought that appending " (cached)" to the filename when the image is cached would be handy, so a second patch is attached which does this.

These patches have only been lightly tested, so feel free to change them as needed.

Thanks,

Julian Calaby