[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub-mkrescue problems in argp_parse

From: Thomas Schmitt
Subject: Re: grub-mkrescue problems in argp_parse
Date: Tue, 14 Apr 2015 11:16:57 +0200


Dietmar Maurer wrote:
> It is quite easy to detect if there is a '--' in the argument list.
> So you could disable magic code if you find '--'?

It is about an unintended but actually beneficial change
in the syntax of grub-mkrescue arguments.

New grub-mkrescue.c interpreted and consumed the word '--',
which the old grub-mkrescue just forwarded to xorriso.
There it serves the important purpose to end the command -as
which performs the mkisofs emulation.

grub-mkrescue runs xorriso this way:

  xorriso -as mkisofs ...grub2.provided.mkisofs-ish.options... \

I.e. the first user provided argument will be interpreted by
xorriso as parameter of its command -as.
The range of -as ends at the first '--' which xorriso encounters.
Further arguments are interpreted by xorriso as commands and
their parameters. (Which are more expressive and capable than
mkisofs emulation.)

I understand that Vladimir reverted the behavioral change
on march 20, so that your run (without any generic xorriso
commands) was intended to work fine by the old style: 

  grub-mkrescue -o pve-cd.iso data-gz -z -r -V 'PVE' -c boot/ ...

But there is another difference to old grub-mkrescue:
The option to print the version string changed from -v to -V.
With mkisofs (and its emulation), -v is rarely used.
So it never mattered that old grub-mkrescue bailed out
when seeing it.
But -V is a frequently used mkisofs option.

So grub-mkrescue.c should either become really compatible
to its shell-based predecessor, or it should get a different
name and use the new syntax, which clearly distinguishes
between own options and xorriso arguments:

  grub-mkiso -o pve-cd.iso -- data-gz -z -r -V 'PVE' -c boot/ ...

All arguments after the first '--' would get forwarded to
xorriso without interpretation by grub-mkiso. The first
'--' itself would not get forwarded to xorriso.

Have a nice day :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]