Re: [Debootloaders-yaboot] Bug#587290: How does linux-base modify /etc/yaboot.conf ?
Le samedi 18 septembre 2010 à 22:11 +0100, Ben Hutchings a écrit :
> The value of the kernel (or rather initramfs) root parameter generally
> does need to include an '=' character and linux-base.postinst is correct
> to use it. It must then double-quote the value in yaboot.conf so that
> it is handled correctly by the main configuration parser in cfg.c.
> Therefore, ybin also needs to accept this format.
Thanks for the check in cfg.c, I didn't have the idea to go there. I
think most people relied on what ybin told them (i.e. "I don't grok
this"). The problem being that ybin never ever understood this syntax,
and the stricter "simple" one was the de-facto standard. This is why
your change hurt so much (#580455 lists now at least 5 persons
affected), and I'm generally reluctant to ancient file format change.
But you're right in that ybin is buggy.
> I could change linux-base.postinst to avoid adding space between name,
> '=' and value when updating the configuration but it seems simple enough
> to make ybin accept that too.
Yes, it's simple. And I think you can't avoid the quotes, because of
spaces ? (I bet some people put spaces in FS labels ?). So yes, ybin
needs fixing, I'll try having a look at that (and Rick's code).
BTW, I'm very curious why we didn't get hit by that earlier. It seems
your code affected yaboot around the time Debian switched to mandatory
UUID/labels, right ? Is your script only triggered for that ? Is it only
done once during the transition (as seems to imply the function's name
from where it's called in your perl code) or on every kernel upgrade ?
> Yes, all parts of yaboot should really be using the same configuration
> parser. Reimplementing it is crazy.
Well, I'm not sure anyone is able/willing to do that here… Let's just
fix the most obvious bug for now, right ?
> By the way, I think this bug should be merged with #580455.
Tried doing it, but didn't work; should I rather forcemerge or try
setting both to the same severity first ? (I don't like messing with so
high severity when it's not my bugs)