On Sat, Jul 15, 2006 at 05:13:53PM -0400, Joe Ciccone wrote: > 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 > > 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.
But surely the only way anyone would have anything on that line is if they'd already been doing something different to the book, in which case (especially with the toolchain) they should be acutely aware of what the instructions do and the possible implications of any changes to them. Robert was suggesting a change that would allow the sed to be applied to other *FLAGS variables. When you consider the dangers in constructing and running commands you don't fully understand in the compilations of toolchain packages, it seems to me that it would be sensible to actively discourage such an activity. In fact, I believe Robert misunderstood the sed, thinking it was something like 's/^XCFLAGS =.*$/& -fomit-frame-pointer/'. If they tried to adapt, say, XFOOFLAGS using this method and XFOOFLAGS looked like: XFOOFLAGS = -blah -foo \ -bar then the sed 's/^XFOOFLAGS =$/& -baz/' would do precisely nothing. So users trying this method who don't know what they're doing end up doing nothing rather than screwing up their compilation. Alex :-) -- Pippin Computer Monkey to the Pelican www.oxrev.org.uk, www.corpusjcr.org, www.rev.org.uk Internal: 30741, external: 0870 2760741
pgp6LUzZLn43g.pgp
Description: PGP signature
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page