Re: [PATCH/RFC] dpkg-shlibdeps: ignore shell scripts
Raphael Hertzog <hertzog@debian.org> writes:
> Hi,
>
> On Fri, 23 Apr 2010, Jonathan Nieder wrote:
>> Goswin von Brederlow wrote:
>>
>> > What is wrong with excluding only scripts, those files begining with a
>> > shebang token? The test for this is easy and you still get errors for
>> > other files that objdump doesn't understand.
>>
>> Yes, I wonder the same thing. What would be the harm in making
>> dpkg-shlibdeps always ignore files starting with a #! line?
>
> If we go down that path, then I would have no reason to refuse patches to
> ignore images, known document formats, any textual file, etc. This is
> useless bloat.
Images, doc and text files are not executables and dpkg-shlibdeps only
expects executables. There is your reason. :)
> I'm all for smartness but reasoned smartness. :-) In this case, we know
> what we're looking after, no need to use a blacklist approach.
If you only check ELF files then you don't get an error if there is an
image in usr/bin. It also becomes more complicated if/when other formats
get added.
The idea of blacklisting #! is that you only exclude known safe files
and still get errors on unknown files. You could combine the two:
if (has_shebang(file)) {
ignore;
} else if (is_elf(file)) {
process;
} else unknown_format_error;
I like the idea of supporting 'dpkg-shlibdeps .../bin/' but that could
be combined with the filtering.
MfG
Goswin
Reply to: