Opened 22 years ago

Closed 22 years ago

Last modified 21 years ago

#479 closed defect (wontfix)

strip command's errors confuse newbies

Reported by: nathanladd@… Owned by: lfs-book@…
Priority: low Milestone:
Component: Book Version: CVS
Severity: normal Keywords:
Cc:

Description

At the end of the book, when the reader executes the big strip command to save some space, a bunch of non-binary files try to get stripped. This isn't a big deal; strip ignores them and gives an "unrecognized filetype" error. The problem is that a lot of these errors get produced, and to a newbie it looks like something went wrong. A note to the reader should be thrown in, like this: NOTE: While this command gets executed, strip will attempt to strip many files that aren't binaries. As a result, it will spit out an error message complaining about an unrecognized file type for each of these files. It is safe to disregard these errors; the actual binaries will get stripped.

Change History (6)

comment:1 by tushar@…, 22 years ago

or redirect error messages to /dev/null?

comment:2 by iwanek@…, 22 years ago

couldnt we make a wrapper using the file command so as to avoid the confusing messages but still show real error messages?

comment:3 by nathanladd@…, 22 years ago

I think redirecting error messages to /dev/null would be a good idea, but seeing > /dev/null is like a big, well-lit sign saying "something is up here; this command is generating a good deal of output." Hence, a brief explanation should still be there, something like "this command will attempt to strip many files that aren't proper ELF binaries, and strip will give an error message for each of these files. These error messages are safe to ignore, so we redirect them to /dev/null.

comment:4 by gerard@…, 22 years ago

A wrapper might be nice. This'll work:

for program_file in $(find $LFS/{,usr/,usr/local/}{bin,sbin,lib}); do

if $(file $program_file|grep -q ELF); then

strip --strip-debug $program_file

fi

done

comment:5 by gerard@…, 22 years ago

Priority: highlow

comment:6 by gerard@…, 22 years ago

Resolution: wontfix
Status: newclosed

Zack put it nicely: We decided the book isn't about catering to newbies, right? Well, let's not.

Note: See TracTickets for help on using tickets.