Bug#608519: grub-pc: 05_debian_theme assumes background image was copied from an installed desktop-base

Brian Potkin claremont102 at gmail.com
Sun Jan 2 19:11:28 UTC 2011


On Sun 02 Jan 2011 at 17:03:56 +0100, Alexander Kurtz wrote:

> Unfortunately I can't think of any way to fix this. 05_debian_theme is
> already comparing filenames AND checksums to make sure it doesn't delete
> user-generated files. I was also thinking about comparing the timestamps
> so that problems like yours could be avoided, however if you take a look
> at the old postinst code...
> 
>         # /boot/grub/ has more chances of being accessible by GRUB
>         if test -e /boot/grub/grub.cfg ; then
>           for i in /usr/share/grub/unicode.pf2 /usr/share/images/desktop-base/moreblue-orbit-grub.png ; do
>             if test -e $i ; then
>               cp $i /boot/grub/
>             fi
>           done
>         fi
> 
> ... you'll see that `cp' was used without the `-a' switch, so timestamps
> were not preserved. Therefore I don't think there is any way to
> determine whether that file was put there by you or GRUB's postinst.

Thanks for your reply.

Surely there is no difference between user-generated and user-installed
files? In either case the user wants the file on the machine(s) and
would not expect the packaging system to delete it. It is unfortunate
the installed file is identical to one in a desktop-base. As you point
out it is the history of 05_debian_theme which is the cause of the
deletion. However, cp -a may not have helped if the file had been copied
from the archive using the -a option.

> That was the bad news. However, there is also good news:
> 
>  a) 05_debian_theme compares both filename and checksum. If you rename 
>     the file to something like `my_custom_background.png' everything 
>     should work just fine.

Reinstalling and renaming works fine, as does putting it in a different
location. But should it happen in the first place?

What are the consquences of the script not deleting what you call old or
obsolete files? Would leaving out that section affect the quality of the
grub-pc package to any great extent?





More information about the Pkg-grub-devel mailing list