On 11/27/19 12:32 PM, Ethan Sommer wrote:
>>> --- a/scripts/libmakepkg/tidy/strip.sh.in
>>> +++ b/scripts/libmakepkg/tidy/strip.sh.in
>>> @@ -111,22 +111,20 @@ tidy_strip() {
>>>
>>> local binary strip_flags
>>> find . -type f -perm -u+w -print0 2>/dev/null | while IFS=
>>> read -rd '' binary ; do
>>> - case "$(file -bi "$binary")" in
>>> - *application/x-sharedlib*) # Libraries (.so)
>>> + case "$(LC_ALL=C readelf -h "$binary" 2>/dev/null)" in
>>
>> More squelching of errors.
> The error redirection to null is because readelf outputs an error when
> the file it is run on isn't an ELF file at all, and obviously that error
> is unwanted.Right, we just want all the other errors. >> Incidentally, is the output of this, documented, or can it arbitrarily >> change in the future? file is guaranteed to emit output in the >> RFC-documented IANA media type format. > These file types and their specification in the file header are part of > the ELF spec Let's pretend I stated from the beginning that I trust the readelf program to be able to also interpret future revisions of the file format. > , and the readelf output has remained consistent, at least > the part that matters to us, and the relevant part is the same across 4 > different implementations, and I doubt there will be some change of the > word 'Type:' being used, given that the ELF specification refers to those > file types as 'types'. I'll take that as a "no, but it's worked for long enough they probably won't change it now". Which I suppose is not so unreasonable... -- Eli Schwartz Bug Wrangler and Trusted User
signature.asc
Description: OpenPGP digital signature
