Bruce Dubbs wrote:
> Robert Connolly wrote:
>
>> This isn't a bug, but the line:
>>
>> sed 's/^XCFLAGS =$/& -fomit-frame-pointer/'
>>
>> can be problematic if a user uses this command to modify other variables,
>> because the -fomit-frame-pointer is appended to the end of the line. Some of
>> the *FLAGS in GCC end with a \ character at the end of the first line, and
>> this command won't work. I suggest we stop using the "$" (end-of-line) card,
>> and use:
>>
>> sed 's/^XCFLAGS =/& -fomit-frame-pointer/'
>>
>> so that -fomit-frame-pointer will be added as the first argument, and the
>> sed
>> will work in any case.
>>
>
> I'd be interested in other opinions.
>
> My initial reaction is that if users apply something to a location that
> is not specified, they can live with the consequences. They can also
> learn the meaning of a sed construct through making a mistake.
>
Why would you want to force someone down the road to making a mistake. I
would bet that a lot of people would just c&p the command and move on,
without giving it a second thought. Roberts change doesn't affect the
people who have an empty line. But it will benefit the people who may
already have something on that line. Forcing someone down the road to
making a mistake does not seem like a reasonable decision to me. It'd
probably be better to teach them why the sed is the way it is, not tell
them that, "This command may not work for you, If in fact the change
isn't made and this sed fails, please figure it out for yourself." A lot
just simply wont or sign onto the irc server to ask how.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page