]> git.donarmstrong.com Git - debhelper.git/commitdiff
Rename _canonpath to canonpath.
authorModestas Vainius <modestas@vainius.eu>
Mon, 29 Jun 2009 16:34:05 +0000 (19:34 +0300)
committerModestas Vainius <modestas@vainius.eu>
Mon, 29 Jun 2009 21:53:07 +0000 (00:53 +0300)
Signed-off-by: Modestas Vainius <modestas@vainius.eu>
Debian/Debhelper/Buildsystem.pm
Debian/Debhelper/Buildsystem/python_distutils.pm
t/buildsystems/buildsystem_tests

index e2037b5fe11322d36d6fb1ea7600cbe489baaf20..8fcb97e6d3b7ba513fbee1af0c313c31eb3184dd 100644 (file)
@@ -84,7 +84,7 @@ sub _set_builddir {
 
        # Canonicalize. If build directory ends up the same as source directory, drop it
        if (defined $this->{builddir}) {
-               $this->{builddir} = $this->_canonpath($this->{builddir});
+               $this->{builddir} = $this->canonpath($this->{builddir});
                if ($this->{builddir} eq $this->get_sourcedir()) {
                        $this->{builddir} = undef;
                }
@@ -149,7 +149,7 @@ sub enforce_out_of_source_building {
 # Enhanced version of File::Spec::canonpath. It collapses ..
 # too so it may return invalid path if symlinks are involved.
 # On the other hand, it does not need for the path to exist.
-sub _canonpath {
+sub canonpath {
        my ($this, $path)=@_;
        my @canon;
        my $back=0;
index 73ac2e300f6a86db98b7677851fbbbcc714812d9..bb502573819658a5c0130f0e9ce85487395a5f6f 100644 (file)
@@ -18,7 +18,7 @@ sub DESCRIPTION {
 
 sub DEFAULT_BUILD_DIRECTORY {
        my $this=shift;
-       return $this->_canonpath($this->get_sourcepath("build"));
+       return $this->canonpath($this->get_sourcepath("build"));
 }
 
 sub new {
index e92e46f123eca827cff0ea0f4afa70e82a1a091d..0c4fcd5c98671f945bcc5b41e70c247c520bb13b 100755 (executable)
@@ -57,13 +57,13 @@ sub process_stdout {
 }
 
 ### Test Buildsystem class API methods
-is( $BS_CLASS->_canonpath("path/to/the/./nowhere/../../somewhere"),
-    "path/to/somewhere", "_canonpath no1" );
-is( $BS_CLASS->_canonpath("path/to/../forward/../../somewhere"),
-    "somewhere","_canonpath no2" );
-is( $BS_CLASS->_canonpath("path/to/../../../somewhere"),
-    "../somewhere","_canonpath no3" );
-is( $BS_CLASS->_canonpath("./"), ".", "_canonpath no4" );
+is( $BS_CLASS->canonpath("path/to/the/./nowhere/../../somewhere"),
+    "path/to/somewhere", "canonpath no1" );
+is( $BS_CLASS->canonpath("path/to/../forward/../../somewhere"),
+    "somewhere","canonpath no2" );
+is( $BS_CLASS->canonpath("path/to/../../../somewhere"),
+    "../somewhere","canonpath no3" );
+is( $BS_CLASS->canonpath("./"), ".", "canonpath no4" );
 is( $BS_CLASS->_rel2rel("path/my/file", "path/my"),
     "file", "_rel2rel no1" );
 is( $BS_CLASS->_rel2rel("path/dir/file", "path/my"),