r44858 - in /trunk/liborlite-mirror-perl: Changes META.yml debian/changelog debian/control 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
Sat Sep 26 15:48:55 UTC 2009


Author: jawnsy-guest
Date: Sat Sep 26 15:48:31 2009
New Revision: 44858

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=44858
Log:
* New upstream release
  + Now requires ORLite 1.28 for prune

Modified:
    trunk/liborlite-mirror-perl/Changes
    trunk/liborlite-mirror-perl/META.yml
    trunk/liborlite-mirror-perl/debian/changelog
    trunk/liborlite-mirror-perl/debian/control
    trunk/liborlite-mirror-perl/lib/ORLite/Mirror.pm
    trunk/liborlite-mirror-perl/t/02_basics.t
    trunk/liborlite-mirror-perl/t/03_zipped.t
    trunk/liborlite-mirror-perl/t/04_bzip2.t
    trunk/liborlite-mirror-perl/t/05_stub.t
    trunk/liborlite-mirror-perl/t/06_stubgz.t
    trunk/liborlite-mirror-perl/t/lib/Test.pm

Modified: trunk/liborlite-mirror-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/Changes?rev=44858&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/Changes (original)
+++ trunk/liborlite-mirror-perl/Changes Sat Sep 26 15:48:31 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: trunk/liborlite-mirror-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/META.yml?rev=44858&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/META.yml (original)
+++ trunk/liborlite-mirror-perl/META.yml Sat Sep 26 15:48:31 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: trunk/liborlite-mirror-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/debian/changelog?rev=44858&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/debian/changelog (original)
+++ trunk/liborlite-mirror-perl/debian/changelog Sat Sep 26 15:48:31 2009
@@ -1,8 +1,13 @@
-liborlite-mirror-perl (1.16-4) UNRELEASED; urgency=low
+liborlite-mirror-perl (1.17-1) UNRELEASED; urgency=low
 
+  [ Jonathan Yu ]
+  * New upstream release
+    + Now requires ORLite 1.28 for prune
+
+  [ Ryan Niebur ]
   * Update jawnsy's email address
 
- -- Ryan Niebur <ryanryan52 at gmail.com>  Tue, 01 Sep 2009 21:19:26 -0700
+ -- Jonathan Yu <jawnsy at cpan.org>  Fri, 25 Sep 2009 12:14:40 -0400
 
 liborlite-mirror-perl (1.16-3) unstable; urgency=low
 

Modified: trunk/liborlite-mirror-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/debian/control?rev=44858&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/debian/control (original)
+++ trunk/liborlite-mirror-perl/debian/control Sat Sep 26 15:48:31 2009
@@ -4,9 +4,9 @@
 Build-Depends: debhelper (>= 7.0.50~)
 Build-Depends-Indep: perl, perl (>= 5.10.1) | libio-compress-bzip2-perl (>= 2.008),
  libtest-cpan-meta-perl, libtest-minimumversion-perl, libwww-perl (>= 5.806),
- libtest-pod-perl (>= 1.26), liburi-perl (>= 1.35), liborlite-perl (>= 1.22),
+ libtest-pod-perl (>= 1.26), liburi-perl, liborlite-perl (>= 1.28),
  libfile-sharedir-perl (>= 1.00), libfile-homedir-perl (>= 0.69),
- liblwp-online-perl (>= 1.07), libpod-simple-perl (>= 3.07),
+ liblwp-online-perl, libpod-simple-perl (>= 3.07),
  libparams-util-perl (>= 0.33), libfile-remove-perl (>= 1.42),
  perl (>= 5.10.1) | libio-compress-zlib-perl (>= 2.011)
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
@@ -20,10 +20,10 @@
 Package: liborlite-mirror-perl
 Architecture: all
 Depends: ${perl:Depends}, ${misc:Depends}, libfile-remove-perl (>= 1.42),
- libfile-homedir-perl (>= 0.69), liborlite-perl (>= 1.22), perl (>= 5.6.0),
+ libfile-homedir-perl (>= 0.69), liborlite-perl (>= 1.28),
  perl (>= 5.10.1) | libio-compress-bzip2-perl (>= 2.008), libfile-sharedir-perl (>= 1.00),
  libparams-util-perl (>= 0.33), perl (>= 5.10.1) | libio-compress-zlib-perl (>= 2.011),
- liblwp-online-perl (>= 1.07), libwww-perl (>= 5.806)
+ liblwp-online-perl, libwww-perl (>= 5.806)
 Description: ORLite extension to use remote SQLite databases
  ORLite::Mirror provides a simple mechanism for opening a read-only SQLite
  database from anywhere on the web. In a method analogous to using ORLite to

Modified: trunk/liborlite-mirror-perl/lib/ORLite/Mirror.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/lib/ORLite/Mirror.pm?rev=44858&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/lib/ORLite/Mirror.pm (original)
+++ trunk/liborlite-mirror-perl/lib/ORLite/Mirror.pm Sat Sep 26 15:48:31 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: trunk/liborlite-mirror-perl/t/02_basics.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/t/02_basics.t?rev=44858&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/t/02_basics.t (original)
+++ trunk/liborlite-mirror-perl/t/02_basics.t Sat Sep 26 15:48:31 2009
@@ -42,6 +42,7 @@
 	maxage       => 1,
 	index        => [ 'table_one.col2' ],
 	user_version => 7,
+	prune        => 1,
 };
 
 1;

Modified: trunk/liborlite-mirror-perl/t/03_zipped.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/t/03_zipped.t?rev=44858&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/t/03_zipped.t (original)
+++ trunk/liborlite-mirror-perl/t/03_zipped.t Sat Sep 26 15:48:31 2009
@@ -46,6 +46,7 @@
 	url    => '$url',
 	maxage => 1,
 	index  => [ 'table_one.col2' ],
+	prune  => 1,
 };
 
 1;

Modified: trunk/liborlite-mirror-perl/t/04_bzip2.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/t/04_bzip2.t?rev=44858&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/t/04_bzip2.t (original)
+++ trunk/liborlite-mirror-perl/t/04_bzip2.t Sat Sep 26 15:48:31 2009
@@ -42,7 +42,11 @@
 BEGIN {
 	\$VERSION = '1.00';
 }
-use ORLite::Mirror '$uri';
+
+use ORLite::Mirror {
+	url   => '$uri',
+	prune => 1,
+};
 
 1;
 

Modified: trunk/liborlite-mirror-perl/t/05_stub.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/t/05_stub.t?rev=44858&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/t/05_stub.t (original)
+++ trunk/liborlite-mirror-perl/t/05_stub.t Sat Sep 26 15:48:31 2009
@@ -43,6 +43,7 @@
 	stub         => 1,
 	update       => 'connect',
 	user_version => 7,
+	prune        => 1,
 };
 
 1;

Modified: trunk/liborlite-mirror-perl/t/06_stubgz.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/t/06_stubgz.t?rev=44858&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/t/06_stubgz.t (original)
+++ trunk/liborlite-mirror-perl/t/06_stubgz.t Sat Sep 26 15:48:31 2009
@@ -48,6 +48,7 @@
 	stub         => 1,
 	update       => 'connect',
 	user_version => 7,
+	prune        => 1,
 };
 
 1;

Modified: trunk/liborlite-mirror-perl/t/lib/Test.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/t/lib/Test.pm?rev=44858&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/t/lib/Test.pm (original)
+++ trunk/liborlite-mirror-perl/t/lib/Test.pm Sat Sep 26 15:48:31 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