Hello community,
here is the log from the commit of package perl-Archive-Tar-Wrapper for
openSUSE:Factory checked in at 2019-04-08 10:39:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Archive-Tar-Wrapper (Old)
and /work/SRC/openSUSE:Factory/.perl-Archive-Tar-Wrapper.new.3908 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Archive-Tar-Wrapper"
Mon Apr 8 10:39:07 2019 rev:5 rq:692031 version:0.35
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Archive-Tar-Wrapper/perl-Archive-Tar-Wrapper.changes
2019-03-29 20:43:05.310677461 +0100
+++
/work/SRC/openSUSE:Factory/.perl-Archive-Tar-Wrapper.new.3908/perl-Archive-Tar-Wrapper.changes
2019-04-08 10:40:27.795297286 +0200
@@ -1,0 +2,23 @@
+Sat Apr 6 05:03:01 UTC 2019 - Stephan Kulow <[email protected]>
+
+- updated to 0.35
+ see /usr/share/doc/packages/perl-Archive-Tar-Wrapper/Changes
+
+ 0.35 (2019/04/05):
+ Added _rem_dots method, a improved way to remove '.' and '..' from
readdir(), supposed to be faster than previous implementation with sort() and
shift().
+ Added two more tests to increase testing coverage.
+ Fixed a small bug regarding Pod, that now covers 100% of the code.
+ Small fixes to documentation.
+
+ 0.34 (2019/03/22):
+ Increased test coverage.
+ Refactored code to make it easier for testing.
+ Disabled performance-small.t for now.
+ Refactored bzip2 tests.
+ Adding META.yml "provides" from Makefile.PL
+ Covered methods that didn't have Pod.
+ Refactored all Pod following best practices.
+ Refactored a single method to be "private".
+ Slightly changed new() to enable unit testing for OS specific
configurations.
+
+-------------------------------------------------------------------
Old:
----
Archive-Tar-Wrapper-0.34.tar.gz
New:
----
Archive-Tar-Wrapper-0.35.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Archive-Tar-Wrapper.spec ++++++
--- /var/tmp/diff_new_pack.BGcAMl/_old 2019-04-08 10:40:28.367297425 +0200
+++ /var/tmp/diff_new_pack.BGcAMl/_new 2019-04-08 10:40:28.375297427 +0200
@@ -17,7 +17,7 @@
Name: perl-Archive-Tar-Wrapper
-Version: 0.34
+Version: 0.35
Release: 0
#Upstream: GPL-1.0-or-later
%define cpan_name Archive-Tar-Wrapper
@@ -74,7 +74,7 @@
%files -f %{name}.files
%defattr(-,root,root,755)
-%doc Changes README.md
+%doc Changes CONTRIBUTING.md README.md
%license LICENSE
%changelog
++++++ Archive-Tar-Wrapper-0.34.tar.gz -> Archive-Tar-Wrapper-0.35.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.34/CONTRIBUTING.md
new/Archive-Tar-Wrapper-0.35/CONTRIBUTING.md
--- old/Archive-Tar-Wrapper-0.34/CONTRIBUTING.md 1970-01-01
01:00:00.000000000 +0100
+++ new/Archive-Tar-Wrapper-0.35/CONTRIBUTING.md 2019-04-06
03:09:37.000000000 +0200
@@ -0,0 +1,21 @@
+# CONTRIBUTING
+
+Contributing to this project is easy.
+
+First you need to fork this repository. It will be much easier if you have a
free Github account.
+
+When done, just hit:
+
+```
+$ git clone https://github.com/<YOUR GITHUB
USERNAME>/archive-tar-wrapper-perl.git
+```
+
+Or whatever you prefer to do to clone a git repository.
+
+From there you can modify or create new files.
+
+When you finished, you then can create a pull request to this project.
+
+Just keep in mind to use Perltidy with your files in order to format them.
That's exactly what is here, and with default configurations.
+
+That's it! Thanks for contributing!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.34/Changes
new/Archive-Tar-Wrapper-0.35/Changes
--- old/Archive-Tar-Wrapper-0.34/Changes 2019-03-19 18:57:18.000000000
+0100
+++ new/Archive-Tar-Wrapper-0.35/Changes 2019-04-06 03:09:37.000000000
+0200
@@ -1,6 +1,23 @@
######################################################################
Revision history for Perl extension Archive::Tar::Wrapper
+0.35 (2019/04/05):
+ Added _rem_dots method, a improved way to remove '.' and '..' from
readdir(), supposed to be faster than previous implementation with sort() and
shift().
+ Added two more tests to increase testing coverage.
+ Fixed a small bug regarding Pod, that now covers 100% of the code.
+ Small fixes to documentation.
+
+0.34 (2019/03/22):
+ Increased test coverage.
+ Refactored code to make it easier for testing.
+ Disabled performance-small.t for now.
+ Refactored bzip2 tests.
+ Adding META.yml "provides" from Makefile.PL
+ Covered methods that didn't have Pod.
+ Refactored all Pod following best practices.
+ Refactored a single method to be "private".
+ Slightly changed new() to enable unit testing for OS specific
configurations.
+
0.33 (2018/07/10):
Skipping bzip2 testing if the program is not available
(https://github.com/glasswalk3r/archive-tar-wrapper-perl/issues/11).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.34/MANIFEST
new/Archive-Tar-Wrapper-0.35/MANIFEST
--- old/Archive-Tar-Wrapper-0.34/MANIFEST 2019-03-23 23:02:24.000000000
+0100
+++ new/Archive-Tar-Wrapper-0.35/MANIFEST 2019-04-06 03:18:00.000000000
+0200
@@ -22,4 +22,5 @@
t/lib/ATWDumbbench.pm
xt/performance-small.t
README.md
+CONTRIBUTING.md
META.json Module JSON meta-data (added by
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.34/META.json
new/Archive-Tar-Wrapper-0.35/META.json
--- old/Archive-Tar-Wrapper-0.34/META.json 2019-03-23 23:02:24.000000000
+0100
+++ new/Archive-Tar-Wrapper-0.35/META.json 2019-04-06 03:18:00.000000000
+0200
@@ -11,7 +11,7 @@
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
- "version" : 2
+ "version" : "2"
},
"name" : "Archive-Tar-Wrapper",
"no_index" : {
@@ -52,20 +52,20 @@
"provides" : {
"Archive::Tar::Wrapper" : {
"file" : "lib/Archive/Tar/Wrapper.pm",
- "version" : "0.34"
+ "version" : "0.35"
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" :
"https://github.com/glasswalk3r/archive-tar-wrapper-perl/issues"
+ },
+ "repository" : {
+ "type" : "git",
+ "url" : "https://github.com/glasswalk3r/archive-tar-wrapper-perl.git",
+ "web" : "https://github.com/glasswalk3r/archive-tar-wrapper-perl"
}
},
- "version" : "0.34",
- "x_repository" : {
- "type" : "git",
- "url" : "https://github.com/glasswalk3r/archive-tar-wrapper-perl.git",
- "web" : "https://github.com/glasswalk3r/archive-tar-wrapper-perl"
- },
- "x_serialization_backend" : "JSON::PP version 2.97001"
+ "version" : "0.35",
+ "x_serialization_backend" : "JSON::PP version 2.27400_02"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.34/META.yml
new/Archive-Tar-Wrapper-0.35/META.yml
--- old/Archive-Tar-Wrapper-0.34/META.yml 2019-03-23 23:02:24.000000000
+0100
+++ new/Archive-Tar-Wrapper-0.35/META.yml 2019-04-06 03:18:00.000000000
+0200
@@ -24,7 +24,7 @@
provides:
Archive::Tar::Wrapper:
file: lib/Archive/Tar/Wrapper.pm
- version: '0.34'
+ version: '0.35'
requires:
Cwd: '0'
File::Temp: '0'
@@ -34,9 +34,6 @@
perl: '5.008001'
resources:
bugtracker: https://github.com/glasswalk3r/archive-tar-wrapper-perl/issues
-version: '0.34'
-x_repository:
- type: git
- url: https://github.com/glasswalk3r/archive-tar-wrapper-perl.git
- web: https://github.com/glasswalk3r/archive-tar-wrapper-perl
+ repository: https://github.com/glasswalk3r/archive-tar-wrapper-perl.git
+version: '0.35'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.34/Makefile.PL
new/Archive-Tar-Wrapper-0.35/Makefile.PL
--- old/Archive-Tar-Wrapper-0.34/Makefile.PL 2019-03-23 22:37:24.000000000
+0100
+++ new/Archive-Tar-Wrapper-0.35/Makefile.PL 2019-04-06 03:09:37.000000000
+0200
@@ -79,13 +79,14 @@
'bugtracker' => {
'web' =>
'https://github.com/glasswalk3r/archive-tar-wrapper-perl/issues',
+ },
+ 'repository' => {
+ 'type' => 'git',
+ 'url' =>
+ 'https://github.com/glasswalk3r/archive-tar-wrapper-perl.git',
+ 'web' => 'https://github.com/glasswalk3r/archive-tar-wrapper-perl',
}
};
- $WriteMakefileArgs{META_MERGE}->{'repository'} = {
- 'type' => 'git',
- 'url' =>
'https://github.com/glasswalk3r/archive-tar-wrapper-perl.git',
- 'web' => 'https://github.com/glasswalk3r/archive-tar-wrapper-perl',
- };
}
# Test::More::is_deeply is required for testing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.34/README.md
new/Archive-Tar-Wrapper-0.35/README.md
--- old/Archive-Tar-Wrapper-0.34/README.md 2019-03-19 18:57:18.000000000
+0100
+++ new/Archive-Tar-Wrapper-0.35/README.md 2019-04-06 03:09:37.000000000
+0200
@@ -14,6 +14,7 @@
# Iterate over all entries in the archive
$arch->list_reset(); # Reset Iterator
+
# Iterate through archive
while(my $entry = $arch->list_next()) {
my($tar_path, $phys_path) = @$entry;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.34/lib/Archive/Tar/Wrapper.pm
new/Archive-Tar-Wrapper-0.35/lib/Archive/Tar/Wrapper.pm
--- old/Archive-Tar-Wrapper-0.34/lib/Archive/Tar/Wrapper.pm 2019-03-23
22:37:24.000000000 +0100
+++ new/Archive-Tar-Wrapper-0.35/lib/Archive/Tar/Wrapper.pm 2019-04-06
03:09:37.000000000 +0200
@@ -18,7 +18,7 @@
use Symbol 'gensym';
use Carp;
-our $VERSION = '0.34';
+our $VERSION = '0.35';
my $logger = get_logger();
=pod
@@ -38,6 +38,7 @@
# Iterate over all entries in the archive
$arch->list_reset(); # Reset Iterator
+
# Iterate through archive
while(my $entry = $arch->list_next()) {
my($tar_path, $phys_path) = @$entry;
@@ -224,6 +225,13 @@
gzip_regex => qr/\.t? # an optional t for matching tgz
gz$ # ending with gz, which means
compressed by gzip
/ix,
+ tar_error_msg => undef,
+ version_info => undef,
+ tar_exit_code => undef,
+ is_gnu => undef,
+ is_bsd => undef,
+ version_info => undef,
+ tar_exit_code => undef,
%options,
};
@@ -389,7 +397,7 @@
#TODO: keep the file list as a fixed attribute of the instance
my $list_file = File::Spec->catfile( $self->{objdir}, 'list' );
- my $cwd = getcwd();
+ my $cwd = getcwd();
chdir $self->{tardir} or LOGDIE "Can't chdir to $self->{tardir}: $!";
open( my $fh, '>', $list_file ) or LOGDIE "Can't open $list_file: $!";
@@ -419,34 +427,41 @@
return 1;
}
-sub _acquire_tar_info {
+sub _read_from_tar {
my $self = shift;
my ( $wtr, $rdr, $err ) = ( gensym, gensym, gensym );
my $pid = open3( $wtr, $rdr, $err, "$self->{tar} --version" );
my ( $output, $error );
+
{
local $/ = undef;
$output = <$rdr>;
$error = <$err>;
}
+
close($rdr);
close($err);
close($wtr);
waitpid( $pid, 0 );
- my $exit = $? >> 8;
-
$self->{tar_error_msg} = $error;
$self->{version_info} = $output;
+ $self->{tar_exit_code} = $? >> 8;
+}
+
+sub _acquire_tar_info {
+ my ( $self, $skip ) = @_;
+ $self->_read_from_tar() unless ($skip);
my $bsd_regex = qr/bsd/i;
$self->{is_gnu} = 0;
$self->{is_bsd} = 0;
# bsdtar exit code is 1 when asking for version
- unless ( ( $exit == 0 ) or ( $self->{tar} =~ $bsd_regex ) ) {
+ unless ( ( $self->{tar_exit_code} == 0 ) or ( $self->{tar} =~ $bsd_regex )
)
+ {
$self->{version_info} = 'Information not available. Search for errors';
}
else {
- if ( $output =~ /GNU/ ) {
+ if ( $self->{version_info} =~ /GNU/ ) {
$self->{is_gnu} = 1;
}
elsif ( $self->{tar} =~ $bsd_regex ) {
@@ -586,7 +601,7 @@
$gid = $opts->{gid} if defined $opts->{gid};
$binmode = $opts->{binmode} if defined $opts->{binmode};
- my $target = File::Spec->catfile( $self->{tardir}, $rel_path );
+ my $target = File::Spec->catfile( $self->{tardir}, $rel_path );
my $target_dir = dirname($target);
unless ( -d $target_dir ) {
@@ -852,11 +867,8 @@
opendir( my $dir, '.' ) or LOGDIE "Cannot open $self->{tardir}: $!";
my @top_entries = readdir($dir);
closedir($dir);
- @top_entries = sort(@top_entries);
- # removing the '.' and '..' entries
- shift(@top_entries);
- shift(@top_entries);
+ $self->_rem_dots( \@top_entries );
my $cmd = [
$self->{tar}, "${compr_opt}cf$self->{tar_write_options}",
@@ -893,6 +905,42 @@
return 1;
}
+sub _rem_dots {
+ my ( $self, $entries_ref ) = @_;
+ my ( $first, $second );
+ my $index = 0;
+ my $found = 0;
+
+ for ( @{$entries_ref} ) {
+
+ if ( ( length($_) <= 2 )
+ and ( ( $_ eq '.' ) or ( $_ eq '..' ) ) )
+ {
+ if ( $found < 1 ) {
+ $first = $index;
+ $found++;
+ $index++;
+ next;
+ }
+ else {
+ $second = $index;
+ last;
+ }
+
+ }
+ else {
+ $index++;
+ }
+ }
+
+ splice( @{$entries_ref}, $first, 1 );
+
+ # array length is now shortened by one
+ splice( @{$entries_ref}, ( $second - 1 ), 1 );
+ return 1;
+
+}
+
sub DESTROY {
my ($self) = @_;
$self->ramdisk_unmount() if defined $self->{ramdisk};
@@ -1003,7 +1051,7 @@
return 1;
}
-=head2 ramdisk_umount
+=head2 ramdisk_unmount
Unmounts the RAM disk already mounted with C<ramdisk_mount>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.34/t/008performance.t
new/Archive-Tar-Wrapper-0.35/t/008performance.t
--- old/Archive-Tar-Wrapper-0.34/t/008performance.t 2019-03-23
22:37:24.000000000 +0100
+++ new/Archive-Tar-Wrapper-0.35/t/008performance.t 2019-04-06
03:09:37.000000000 +0200
@@ -128,8 +128,8 @@
}
}
- splice( @temp, $first, 1, 1 );
- splice( @temp, $second, 1, 1 );
+ splice( @temp, $first, 1 );
+ splice( @temp, ( $second - 1 ), 1 );
}
),
Dumbbench::Instance::PerlSub->new(