Actually, there is a difference between the regex as shown below and just removing the rogue [

Try it against the file

/debian/d-i/modules/fat-modules


1) This option does *not* add a ? at the end of each line
sed -i 's/^\([^ ?]+\)$/\1 ?/' $i

2) This option (the fixed version of the original) *does* add a question mark at the end of each line
sed -i 's/^\([^ ?][^ ?]*\)$/\1 ?/' $i

I agree with Sam, let's comment the line out altogether, then add a comment with what we suspect is correct until we get more information on what these ? actually mean.

Regards,

Tony


Sam Geeraerts wrote:
Karl Goetz schreef:
On Tue, 18 Aug 2009 23:27:18 +1000
Tony <[email protected]> wrote:

That proposed regex is syntactically incorrect, I believe.

It does not close the \( with a corresponding \)


Good catch.
Should have been:
sed -i 's/^\([^ ?]+\)$/\1 ?/' $i

As for leaving it broken - yeah. thats an option too. I'm not going to
block the release on it, for example ;)

Regex looks OK now. Since I couldn't find any documentation, I asked in #ubuntu-kernel about these modules files, but I got only tumbleweeds. Judging from the comment "so it'll compile without some modules" it was introduced to fix a broken build (although I wonder how it fixed anything with that regex). So if the current build ain't broken, there's no real need to fix it. I'd at least add the fixed regexp in a comment anyway, maybe with a "TODO: Find out what this does". With any luck someone smarter than us will take notice and explain it.


_______________________________________________
gNewSense-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/gnewsense-dev


_______________________________________________
gNewSense-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/gnewsense-dev

Reply via email to