r44828 - in /branches/upstream/liborlite-mirror-perl/current: Changes META.yml lib/ORLite/Mirror.pm t/02_basics.t t/03_zipped.t t/04_bzip2.t t/05_stub.t t/06_stubgz.t t/lib/Test.pm
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Fri Sep 25 20:04:56 UTC 2009
Author: jawnsy-guest
Date: Fri Sep 25 20:04:49 2009
New Revision: 44828
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=44828
Log:
[svn-upgrade] Integrating new upstream version, liborlite-mirror-perl (1.17)
Modified:
branches/upstream/liborlite-mirror-perl/current/Changes
branches/upstream/liborlite-mirror-perl/current/META.yml
branches/upstream/liborlite-mirror-perl/current/lib/ORLite/Mirror.pm
branches/upstream/liborlite-mirror-perl/current/t/02_basics.t
branches/upstream/liborlite-mirror-perl/current/t/03_zipped.t
branches/upstream/liborlite-mirror-perl/current/t/04_bzip2.t
branches/upstream/liborlite-mirror-perl/current/t/05_stub.t
branches/upstream/liborlite-mirror-perl/current/t/06_stubgz.t
branches/upstream/liborlite-mirror-perl/current/t/lib/Test.pm
Modified: branches/upstream/liborlite-mirror-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/Changes?rev=44828&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/Changes (original)
+++ branches/upstream/liborlite-mirror-perl/current/Changes Fri Sep 25 20:04:49 2009
@@ -1,4 +1,9 @@
Changes for Perl extension ORLite-Mirror
+
+1.17 Fri 25 Sep 2009
+ - Updating ORLite dep to 1.28 to get prune support.
+ - Integrated support for prune to ORLite::Mirror
+ - Switch all tests to use prune
1.16 Tue 7 Jul 2009
- Bug fix to the show_progress param
Modified: branches/upstream/liborlite-mirror-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/META.yml?rev=44828&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/META.yml (original)
+++ branches/upstream/liborlite-mirror-perl/current/META.yml Fri Sep 25 20:04:49 2009
@@ -34,11 +34,11 @@
IO::Uncompress::Gunzip: 2.008
LWP::Online: 1.07
LWP::UserAgent: 5.806
- ORLite: 1.22
+ ORLite: 1.28
Params::Util: 0.33
perl: 5.6.0
resources:
ChangeLog: http://fisheye2.atlassian.com/changelog/cpan/trunk/ORLite-Mirror
license: http://dev.perl.org/licenses/
repository: http://svn.ali.as/cpan/trunk/ORLite-Mirror
-version: 1.16
+version: 1.17
Modified: branches/upstream/liborlite-mirror-perl/current/lib/ORLite/Mirror.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/lib/ORLite/Mirror.pm?rev=44828&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/lib/ORLite/Mirror.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/lib/ORLite/Mirror.pm Fri Sep 25 20:04:49 2009
@@ -9,16 +9,16 @@
use File::Remove 1.42 ();
use File::HomeDir 0.69 ();
use File::ShareDir 1.00 ();
-use Params::Util 0.33 qw{ _STRING _NONNEGINT _HASH };
+use Params::Util 0.33 ();
use IO::Uncompress::Gunzip 2.008 ();
use IO::Uncompress::Bunzip2 2.008 ();
use LWP::UserAgent 5.806 ();
use LWP::Online 1.07 ();
-use ORLite 1.22 ();
+use ORLite 1.28 ();
use vars qw{$VERSION @ISA};
BEGIN {
- $VERSION = '1.16';
+ $VERSION = '1.17';
@ISA = 'ORLite';
}
@@ -34,21 +34,21 @@
# Check for debug mode
my $DEBUG = 0;
- if ( defined _STRING($_[-1]) and $_[-1] eq '-DEBUG' ) {
+ if ( defined Params::Util::_STRING($_[-1]) and $_[-1] eq '-DEBUG' ) {
$DEBUG = 1;
pop @_;
}
# Check params and apply defaults
my %params;
- if ( defined _STRING($_[1]) ) {
+ if ( defined Params::Util::_STRING($_[1]) ) {
# Support the short form "use ORLite 'http://.../db.sqlite'"
%params = (
url => $_[1],
readonly => undef, # Automatic
package => undef, # Automatic
);
- } elsif ( _HASH($_[1]) ) {
+ } elsif ( Params::Util::_HASH($_[1]) ) {
%params = %{ $_[1] };
} else {
Carp::croak("Missing, empty or invalid params HASH");
@@ -74,7 +74,7 @@
unless ( defined $maxage ) {
$maxage = 86400;
}
- unless ( _NONNEGINT($maxage) ) {
+ unless ( Params::Util::_NONNEGINT($maxage) ) {
Carp::croak("Invalid maxage param '$maxage'");
}
@@ -107,7 +107,8 @@
# Create it if needed
unless ( -e $dir ) {
- File::Path::mkpath( $dir, { verbose => 0 } );
+ my @dirs = File::Path::mkpath( $dir, { verbose => 0 } );
+ $class->prune(@dirs) if $params{prune};
}
# Determine the mirror database file
@@ -118,6 +119,9 @@
# Download compressed files with their extention first
my $url = delete $params{url};
my $path = ($url =~ /(\.gz|\.bz2)$/) ? "$db$1" : $db;
+ unless ( -f $path ) {
+ $class->prune($path) if $params{prune};
+ }
# Are we online (fake to true if the URL is local)
my $online = !! ( $url =~ /^file:/ or LWP::Online::online() );
@@ -137,7 +141,11 @@
} else {
$update = 'compile';
}
- }
+ $class->prune($db) if $params{prune};
+ }
+
+ # We've finished with all the pruning we'll need to do
+ $params{prune} = 0;
# Don't update if the file is newer than the maxage
my $mtime = (stat($path))[9] || 0;
@@ -304,7 +312,7 @@
END_PERL
}
- # Hand off to the main ORLite class.
+ # Hand off to the main ORLite class
$class->SUPER::import(
\%params,
$DEBUG ? '-DEBUG' : ()
Modified: branches/upstream/liborlite-mirror-perl/current/t/02_basics.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/02_basics.t?rev=44828&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/02_basics.t (original)
+++ branches/upstream/liborlite-mirror-perl/current/t/02_basics.t Fri Sep 25 20:04:49 2009
@@ -42,6 +42,7 @@
maxage => 1,
index => [ 'table_one.col2' ],
user_version => 7,
+ prune => 1,
};
1;
Modified: branches/upstream/liborlite-mirror-perl/current/t/03_zipped.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/03_zipped.t?rev=44828&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/03_zipped.t (original)
+++ branches/upstream/liborlite-mirror-perl/current/t/03_zipped.t Fri Sep 25 20:04:49 2009
@@ -46,6 +46,7 @@
url => '$url',
maxage => 1,
index => [ 'table_one.col2' ],
+ prune => 1,
};
1;
Modified: branches/upstream/liborlite-mirror-perl/current/t/04_bzip2.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/04_bzip2.t?rev=44828&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/04_bzip2.t (original)
+++ branches/upstream/liborlite-mirror-perl/current/t/04_bzip2.t Fri Sep 25 20:04:49 2009
@@ -42,7 +42,11 @@
BEGIN {
\$VERSION = '1.00';
}
-use ORLite::Mirror '$uri';
+
+use ORLite::Mirror {
+ url => '$uri',
+ prune => 1,
+};
1;
Modified: branches/upstream/liborlite-mirror-perl/current/t/05_stub.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/05_stub.t?rev=44828&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/05_stub.t (original)
+++ branches/upstream/liborlite-mirror-perl/current/t/05_stub.t Fri Sep 25 20:04:49 2009
@@ -43,6 +43,7 @@
stub => 1,
update => 'connect',
user_version => 7,
+ prune => 1,
};
1;
Modified: branches/upstream/liborlite-mirror-perl/current/t/06_stubgz.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/06_stubgz.t?rev=44828&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/06_stubgz.t (original)
+++ branches/upstream/liborlite-mirror-perl/current/t/06_stubgz.t Fri Sep 25 20:04:49 2009
@@ -48,6 +48,7 @@
stub => 1,
update => 'connect',
user_version => 7,
+ prune => 1,
};
1;
Modified: branches/upstream/liborlite-mirror-perl/current/t/lib/Test.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/lib/Test.pm?rev=44828&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/lib/Test.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/t/lib/Test.pm Fri Sep 25 20:04:49 2009
@@ -10,7 +10,7 @@
use vars qw{$VERSION @ISA @EXPORT};
BEGIN {
- $VERSION = '1.16';
+ $VERSION = '1.17';
@ISA = 'Exporter';
@EXPORT = qw{ test_db mirror_db connect_ok create_ok };
}
More information about the Pkg-perl-cvs-commits
mailing list