Ver código fonte

Dpkg::Shlibs: Rename reset_library_paths() to blank_library_paths()

This will allow to initialize the library paths to be an empty array,
instead of just resetting it after the fact, which means the new name
will make more sense.
Guillem Jover 11 anos atrás
pai
commit
fe4bec2900
2 arquivos alterados com 7 adições e 7 exclusões
  1. 5 5
      scripts/Dpkg/Shlibs.pm
  2. 2 2
      scripts/t/Dpkg_Shlibs.t

+ 5 - 5
scripts/Dpkg/Shlibs.pm

@@ -21,7 +21,7 @@ use warnings;
 our $VERSION = '0.02';
 our $VERSION = '0.02';
 
 
 use Exporter qw(import);
 use Exporter qw(import);
-our @EXPORT_OK = qw(add_library_dir get_library_paths reset_library_paths
+our @EXPORT_OK = qw(blank_library_paths add_library_dir get_library_paths
                     find_library);
                     find_library);
 
 
 
 
@@ -107,6 +107,10 @@ sub parse_ldso_conf {
     close $fh;
     close $fh;
 }
 }
 
 
+sub blank_library_paths {
+    @librarypaths = ();
+}
+
 sub add_library_dir {
 sub add_library_dir {
     my $dir = shift;
     my $dir = shift;
     unshift @librarypaths, $dir;
     unshift @librarypaths, $dir;
@@ -116,10 +120,6 @@ sub get_library_paths {
     return @librarypaths;
     return @librarypaths;
 }
 }
 
 
-sub reset_library_paths {
-    @librarypaths = ();
-}
-
 # find_library ($soname, \@rpath, $format, $root)
 # find_library ($soname, \@rpath, $format, $root)
 sub find_library {
 sub find_library {
     my ($lib, $rpath, $format, $root) = @_;
     my ($lib, $rpath, $format, $root) = @_;

+ 2 - 2
scripts/t/Dpkg_Shlibs.t

@@ -26,11 +26,11 @@ my $tmp;
 my @tmp;
 my @tmp;
 my %tmp;
 my %tmp;
 
 
-Dpkg::Shlibs::reset_library_paths();
-
 my $srcdir = $ENV{srcdir} || '.';
 my $srcdir = $ENV{srcdir} || '.';
 my $datadir = $srcdir . '/t/Dpkg_Shlibs';
 my $datadir = $srcdir . '/t/Dpkg_Shlibs';
 
 
+Dpkg::Shlibs::blank_library_paths();
+
 # We want relative paths inside the ld.so.conf fragments to work, and $srcdir
 # We want relative paths inside the ld.so.conf fragments to work, and $srcdir
 # is usually a relative path, so let's temporarily switch directory.
 # is usually a relative path, so let's temporarily switch directory.
 # XXX: An alternative would be to make parse_ldso_conf relative path aware.
 # XXX: An alternative would be to make parse_ldso_conf relative path aware.