]> err.no Git - dpkg/commitdiff
Misc. code cleanup
authorFrank Lichtenheld <djpig@debian.org>
Sat, 14 Jul 2007 20:55:48 +0000 (20:55 +0000)
committerFrank Lichtenheld <djpig@debian.org>
Sat, 14 Jul 2007 20:55:48 +0000 (20:55 +0000)
scripts/dpkg-gensymbols.pl
scripts/dpkg-shlibdeps.pl

index 4dbae9b2eecd9a92248ad24e62ccede22f8b3957..2e81d22f2ffa19d1e469d9888a5076f617cdd0ef 100755 (executable)
@@ -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);
index 65f5cff7b2ef5201ec9edfcd0d000d75e2beec1d..6cf8fded721accbb8c0f8800da8ed2df76cf052e 100755 (executable)
@@ -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};