On Thu, 17 Jan 2008, Joey Hess wrote: > I'm unsure about older versions of dpkg-shlibdeps. The current, insanely > smart version, doesn't get too upset when run on split debugging symbol > files: > > [EMAIL PROTECTED]:~package/aalib>dpkg-shlibdeps > /usr/lib/debug/usr/lib/libaa.so.1.0.4 > objdump: /usr/lib/debug/usr/lib/libaa.so.1.0.4: Invalid operation > > (The return code is zero.) > > Raphael, is the objbump message above passed through intentionally?
It can be debated... open(my $objdump, "-|", "objdump", "-w", "-f", "-p", "-T", "-R", $file) || syserr(sprintf(_g("Can't execute objdump: %s"), $!)); my $ret = $self->_parse($objdump); close($objdump); Thus it's not checking the return code of objdump and it's not redirecting its stderr either. Since this is deep in a module used by dpkg-shlibdeps, it's not a good idea to fail directly. In that condition hiding the errors is not a good idea. dpkg-shlibdeps generally acts on the assumption that its input is sane. That said, if you know of a simple way to identify stuff that can be safely excluded, I'll consider it. > If dpkg-shlibdeps didn't print that message at all and silently skipped > separated debug symbol files, I'd be inclined to make dh_shlibdeps > not exclude anything in usr/lib/debug. If the message is intentional or > cannot be gotten rid of, it seems that dh_shlibdeps should be changed to > use a tighter exclude pattern, maybe including usr/lib/debug/*.so* while > excluding anything else under usr/lib/debug .. This will probably not work as expected: $ objdump -w -f -p -T -R /usr/lib/debug/usr/bin/gnome-panel >/dev/null objdump: /usr/lib/debug/usr/bin/gnome-panel: not a dynamic object objdump: /usr/lib/debug/usr/bin/gnome-panel: Invalid operation $ objdump -w -f -p -T -R /usr/bin/gnome-panel >/dev/null $ And those files really look like normal ELF objects at first look (with file or with objdump -a). If we want to relibaly detect those, we apparently have to call "objdump -p" on them and check if there's something in the "Dynamic Section:" or not. If yes, then it should be safe to be analyzed. Cheers, -- Raphaël Hertzog Le best-seller français mis à jour pour Debian Etch : http://www.ouaza.com/livre/admin-debian/