Re: Duplicate files /boot/grub/locale/*.mo~ in iso file made by grub-mkrescue

Adam Purkrt <[email protected]> Sat, 24 May 2025 14:50:23 +0200
Newsgroups gmane.comp.boot-loaders.grub.bugs
Message-ID <[email protected]>
Hi, no, actually there is not any occurrence of the string "mo~" in
the output

renergy ~ # grub-mkrescue --verbose -o grub.iso 2>&1 | grep mo~
renergy ~ #

Best regards,
Adam

On 5/23/25 10:45 PM, Thomas Schmitt wrote:
> Hi,
> 
> i cannot see any use of string "locale" in util/grub-mkrescue.c.
> The files came in as part of the temporaty directory tree
> /tmp/grub.GoPPTa
> 
> So the ".mo~" files probably stem from the activities of grub-install
> functions underneath grub-mkrescue.
> In grub-mkrescue.c :
>    main() -> grub_install_copy_files()
> grub-install-common.c :
>    grub_install_copy_files() -> grub_install_copy_nls() ->
>    copy_locales() -> grub_install_compress_file() ->
>    grub_install_copy_file()
> 
> But copy_locales() attaches ".mo" to every file name it copies.
> The existence of ".mo~" suffixes contradicts the theory that these
> files came from copy_locales().
> 
> On the other hand i ran grub-mkrescue on Debian 12 with
> option --verbose and got among many other messages:
> 
>    grub-mkrescue: info: copying `/usr/share/locale/en@cyrillic/LC_MESSAGES/grub.mo' -> `/tmp/grub.OsYS33/boot/grub/locale/[email protected]'.
> 
> but nothing about  [email protected]~ .
> The message obviously stems from grub_install_copy_file().
> 
> 
> Do you see a message about copying "[email protected]~" when running
> grub-mkrescue with option --verbose ?
> 
> I ran
>    grub-mkrescue --verbose -o output.iso minimal 2>&1 | less
> to catch all 4570 lines of message output.
> They are about the same with Debian's grub-mkrescue 2.06-13+deb12u1 and
> grub-mkrescue 2.13 from git as of march 2025. There's not much change
> activity in grub-mkrescue.
> 
> 
> Have a nice day :)
> 
> Thomas
>