From 2d54fee2831f98ea26425ff688cae9f66b6978da Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sat, 14 Jul 2007 20:55:48 +0000 Subject: [PATCH] Misc. code cleanup --- scripts/dpkg-gensymbols.pl | 2 +- scripts/dpkg-shlibdeps.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/dpkg-gensymbols.pl b/scripts/dpkg-gensymbols.pl index 4dbae9b2..2e81d22f 100755 --- a/scripts/dpkg-gensymbols.pl +++ b/scripts/dpkg-gensymbols.pl @@ -228,7 +228,7 @@ if ($compare) { warning(sprintf(_g("no debian/symbols file used as basis for generating %s\n"), $output)); } my ($a, $b) = ($before->filename, $after->filename); - system("diff -u $a $b") if -x "/usr/bin/diff"; + system("diff", "-u", $a, $b) if -x "/usr/bin/diff"; } } exit($exitcode); diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl index 65f5cff7..6cf8fded 100755 --- a/scripts/dpkg-shlibdeps.pl +++ b/scripts/dpkg-shlibdeps.pl @@ -95,10 +95,11 @@ foreach my $file (keys %exec) { print "Scanning $file (for $cur_field field)\n" if $debug; my $obj = Dpkg::Shlibs::Objdump::Object->new($file); + my @sonames = $obj->get_needed_libraries; # Load symbols files for all needed libraries (identified by SONAME) my %libfiles; - foreach my $soname ($obj->get_needed_libraries) { + foreach my $soname (@sonames) { my $file = my_find_library($soname, $obj->{RPATH}, $obj->{format}); warning("Couldn't find library $soname.") unless defined($file); $libfiles{$file} = $soname if defined($file); @@ -146,7 +147,6 @@ foreach my $file (keys %exec) { # Scan all undefined symbols of the binary and resolve to a # dependency - my @sonames = $obj->get_needed_libraries; my %used_sonames = map { $_ => 0 } @sonames; foreach my $sym ($obj->get_undefined_dynamic_symbols()) { my $name = $sym->{name}; -- 2.39.5