r7627 - in /branches/upstream/libarchive-tar-perl/current: CHANGES META.yml lib/Archive/Tar.pm lib/Archive/Tar/Constant.pm

rmayorga-guest at users.alioth.debian.org rmayorga-guest at users.alioth.debian.org
Mon Sep 17 03:34:23 UTC 2007


Author: rmayorga-guest
Date: Mon Sep 17 03:34:21 2007
New Revision: 7627

URL: http://svn.debian.org/wsvn/?sc=1&rev=7627
Log:
[svn-upgrade] Integrating new upstream version, libarchive-tar-perl (1.36)

Modified:
    branches/upstream/libarchive-tar-perl/current/CHANGES
    branches/upstream/libarchive-tar-perl/current/META.yml
    branches/upstream/libarchive-tar-perl/current/lib/Archive/Tar.pm
    branches/upstream/libarchive-tar-perl/current/lib/Archive/Tar/Constant.pm

Modified: branches/upstream/libarchive-tar-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/branches/upstream/libarchive-tar-perl/current/CHANGES?rev=7627&op=diff
==============================================================================
--- branches/upstream/libarchive-tar-perl/current/CHANGES (original)
+++ branches/upstream/libarchive-tar-perl/current/CHANGES Mon Sep 17 03:34:21 2007
@@ -1,3 +1,6 @@
+* important changes in version 1.36 16/9/2007:
+-   Portability fixes for VMS, as offered by Craig Berry.
+
 * important changes in version 1.34 15/8/2007:
 -   Address #28687: Fwd: Unespected reaction of Archive::Tar
     A::T didn't always handle filenames that evaluated to false 
@@ -7,11 +10,15 @@
 -   Apply #28407: Unicode and Archive::Tar - documentation patch as
 	FAQ patch
 
-* important changes in version 1.32 24/5/2007:
--   Make Archive::Tar work nicely with perls compiled with 
-    -Dmksymlinks. This also fixes an issue introduced in 
-    1.31 where symlinks weren't dereferenced in all cases.
--   Quell warnings when a gid is not resolvable to a group name 
+* important changes in version 1.32 25/7/2007:
+-   Apply #28407: Unicode and Archive::Tar - documentation patch as
+    FAQ patch
+-   Following a report from rgs that A::T 1.31 doesn't play nicely
+    with -Dmksymlinks under perl core, rewrite the symlink logic in
+    A::T::File->new to continue building an object when reading a 
+    symlink fails, rather than refusing to read on a symlink (which 
+    is obviously wrong)
+-   Quell warnings when a gid is not resolvable to a group name
 
 * important changes in version 1.31 18/5/2007:
 -   No longer use the t/setup.t and t/cleanup.t files but just bundle 

Modified: branches/upstream/libarchive-tar-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libarchive-tar-perl/current/META.yml?rev=7627&op=diff
==============================================================================
--- branches/upstream/libarchive-tar-perl/current/META.yml (original)
+++ branches/upstream/libarchive-tar-perl/current/META.yml Mon Sep 17 03:34:21 2007
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Archive-Tar
-version:      1.34
+version:      1.36
 version_from: lib/Archive/Tar.pm
 installdirs:  site
 requires:

Modified: branches/upstream/libarchive-tar-perl/current/lib/Archive/Tar.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libarchive-tar-perl/current/lib/Archive/Tar.pm?rev=7627&op=diff
==============================================================================
--- branches/upstream/libarchive-tar-perl/current/lib/Archive/Tar.pm (original)
+++ branches/upstream/libarchive-tar-perl/current/lib/Archive/Tar.pm Mon Sep 17 03:34:21 2007
@@ -14,7 +14,7 @@
 $DEBUG              = 0;
 $WARN               = 1;
 $FOLLOW_SYMLINK     = 0;
-$VERSION            = "1.34";
+$VERSION            = "1.36";
 $CHOWN              = 1;
 $CHMOD              = 1;
 $DO_NOT_USE_PREFIX  = 0;
@@ -496,7 +496,7 @@
 =head2 $tar->extract_file( $file, [$extract_path] )
 
 Write an entry, whose name is equivalent to the file name provided to
-disk. Optionally takes a second parameter, which is the full (unix)
+disk. Optionally takes a second parameter, which is the full native
 path (including filename) the entry will be written to.
 
 For example:
@@ -547,11 +547,39 @@
     ### it's a relative path ###
     } else {
         my $cwd     = (defined $self->{cwd} ? $self->{cwd} : cwd());
-        my @dirs    = File::Spec::Unix->splitdir( $dirs );
-        my @cwd     = File::Spec->splitdir( $cwd );
-        $dir        = File::Spec->catdir( @cwd, @dirs );
-
-        # catdir() returns undef if the path is longer than 255 chars on VMS
+
+
+
+        my @dirs = defined $alt
+            ? File::Spec->splitdir( $dirs )         # It's a local-OS path
+            : File::Spec::Unix->splitdir( $dirs );  # it's UNIX-style, likely
+                                                    # straight from the tarball
+        
+        ### '.' is the directory delimiter, of which the first one has to
+        ### be escaped/changed.
+        map tr/\./_/, @dirs if ON_VMS;        
+
+        my ($cwd_vol,$cwd_dir,$cwd_file) 
+                    = File::Spec->splitpath( $cwd );
+        my @cwd     = File::Spec->splitdir( $cwd_dir );
+        push @cwd, $cwd_file if length $cwd_file;
+
+        ### We need to pass '' as the last elemant to catpath. Craig Berry
+        ### explains why (msgid <p0624083dc311ae541393@[172.16.52.1]>):
+        ### The root problem is that splitpath on UNIX always returns the 
+        ### final path element as a file even if it is a directory, and of
+        ### course there is no way it can know the difference without checking
+        ### against the filesystem, which it is documented as not doing.  When
+        ### you turn around and call catpath, on VMS you have to know which bits
+        ### are directory bits and which bits are file bits.  In this case we
+        ### know the result should be a directory.  I had thought you could omit
+        ### the file argument to catpath in such a case, but apparently on UNIX
+        ### you can't.
+        $dir        = File::Spec->catpath( 
+                            $cwd_vol, File::Spec->catdir( @cwd, @dirs ), '' 
+                        );
+
+        ### catdir() returns undef if the path is longer than 255 chars on VMS
         unless ( defined $dir ) {
             $^W && $self->_error( qq[Could not compose a path for '$dirs'\n] );
             return;

Modified: branches/upstream/libarchive-tar-perl/current/lib/Archive/Tar/Constant.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libarchive-tar-perl/current/lib/Archive/Tar/Constant.pm?rev=7627&op=diff
==============================================================================
--- branches/upstream/libarchive-tar-perl/current/lib/Archive/Tar/Constant.pm (original)
+++ branches/upstream/libarchive-tar-perl/current/lib/Archive/Tar/Constant.pm Mon Sep 17 03:34:21 2007
@@ -10,7 +10,7 @@
                 BLOCK_SIZE TAR_PAD TAR_END ON_UNIX BLOCK CAN_READLINK MAGIC 
                 TAR_VERSION UNAME GNAME CAN_CHOWN MODE CHECK_SUM UID GID 
                 GZIP_MAGIC_NUM MODE_READ LONGLINK LONGLINK_NAME PREFIX_LENGTH
-                LABEL NAME_LENGTH STRIP_MODE
+                LABEL NAME_LENGTH STRIP_MODE ON_VMS
             ];
 
     require Time::Local if $^O eq "MacOS";
@@ -73,5 +73,6 @@
 use constant CAN_CHOWN      => do { ($> == 0 and $^O ne "MacOS" and $^O ne "MSWin32") };
 use constant CAN_READLINK   => ($^O ne 'MSWin32' and $^O !~ /RISC(?:[ _])?OS/i and $^O ne 'VMS');
 use constant ON_UNIX        => ($^O ne 'MSWin32' and $^O ne 'MacOS' and $^O ne 'VMS');
+use constant ON_VMS         => $^O eq 'VMS'; 
 
 1;




More information about the Pkg-perl-cvs-commits mailing list