r49935 - in /trunk/liborlite-mirror-perl: Changes MANIFEST META.yml README debian/changelog debian/control lib/ORLite/Mirror.pm t/03_gzip.t t/03_zipped.t t/07_badfile.t t/data/ t/lib/Test.pm

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sat Jan 2 17:09:16 UTC 2010


Author: jawnsy-guest
Date: Sat Jan  2 17:09:09 2010
New Revision: 49935

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=49935
Log:
* New upstream release
* Requires ORLite 1.30 per upstream
* Pod::Simple 3.07 is satisfied by Perl 5.10.1

Added:
    trunk/liborlite-mirror-perl/t/03_gzip.t
      - copied unchanged from r49931, branches/upstream/liborlite-mirror-perl/current/t/03_gzip.t
    trunk/liborlite-mirror-perl/t/07_badfile.t
      - copied unchanged from r49931, branches/upstream/liborlite-mirror-perl/current/t/07_badfile.t
    trunk/liborlite-mirror-perl/t/data/
      - copied from r49931, branches/upstream/liborlite-mirror-perl/current/t/data/
Removed:
    trunk/liborlite-mirror-perl/t/03_zipped.t
Modified:
    trunk/liborlite-mirror-perl/Changes
    trunk/liborlite-mirror-perl/MANIFEST
    trunk/liborlite-mirror-perl/META.yml
    trunk/liborlite-mirror-perl/README
    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/lib/Test.pm

Modified: trunk/liborlite-mirror-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/Changes?rev=49935&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/Changes (original)
+++ trunk/liborlite-mirror-perl/Changes Sat Jan  2 17:09:09 2010
@@ -1,7 +1,13 @@
 Changes for Perl extension ORLite-Mirror
 
+1.18 Sat  2 Jan 2010
+	- Upgrading ORLite dependency to 1.30 to get improved startup
+	  error handling, and new DBD::SQLite 1.27
+	- Added user_version consistency checking on ->refresh
+	- Completing the first basic implementation of stub support
+
 1.17 Fri 25 Sep 2009
-	- Updating ORLite dep to 1.28 to get prune support.
+	- Updating ORLite dep to 1.28 to get prune support
 	- Integrated support for prune to ORLite::Mirror
 	- Switch all tests to use prune
 

Modified: trunk/liborlite-mirror-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/MANIFEST?rev=49935&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/MANIFEST (original)
+++ trunk/liborlite-mirror-perl/MANIFEST Sat Jan  2 17:09:09 2010
@@ -21,11 +21,14 @@
 t/01_compile.t
 t/02_basics.sql
 t/02_basics.t
-t/03_zipped.t
+t/03_gzip.t
 t/04_bzip2.t
 t/05_stub.t
 t/06_stubgz.t
+t/07_badfile.t
 t/97_meta.t
 t/98_pod.t
 t/99_pmv.t
+t/data/broken.db
+t/data/broken.db.gz
 t/lib/Test.pm

Modified: trunk/liborlite-mirror-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/META.yml?rev=49935&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/META.yml (original)
+++ trunk/liborlite-mirror-perl/META.yml Sat Jan  2 17:09:09 2010
@@ -34,11 +34,11 @@
   IO::Uncompress::Gunzip: 2.008
   LWP::Online: 1.07
   LWP::UserAgent: 5.806
-  ORLite: 1.28
+  ORLite: 1.30
   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.17
+version: 1.18

Modified: trunk/liborlite-mirror-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/README?rev=49935&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/README (original)
+++ trunk/liborlite-mirror-perl/README Sat Jan  2 17:09:09 2010
@@ -39,7 +39,7 @@
     Adam Kennedy <adamk at cpan.org>
 
 COPYRIGHT
-    Copyright 2008 - 2009 Adam Kennedy.
+    Copyright 2008 - 2010 Adam Kennedy.
 
     This program is free software; you can redistribute it and/or modify it
     under the same terms as Perl itself.

Modified: trunk/liborlite-mirror-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/debian/changelog?rev=49935&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/debian/changelog (original)
+++ trunk/liborlite-mirror-perl/debian/changelog Sat Jan  2 17:09:09 2010
@@ -1,3 +1,11 @@
+liborlite-mirror-perl (1.18-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * Requires ORLite 1.30 per upstream
+  * Pod::Simple 3.07 is satisfied by Perl 5.10.1
+
+ -- Jonathan Yu <jawnsy at cpan.org>  Sat, 02 Jan 2010 12:02:11 -0500
+
 liborlite-mirror-perl (1.17-1) unstable; urgency=low
 
   [ Jonathan Yu ]

Modified: trunk/liborlite-mirror-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-mirror-perl/debian/control?rev=49935&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/debian/control (original)
+++ trunk/liborlite-mirror-perl/debian/control Sat Jan  2 17:09:09 2010
@@ -2,16 +2,15 @@
 Section: perl
 Priority: optional
 Build-Depends: debhelper (>= 7.0.50~)
-Build-Depends-Indep: 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, liborlite-perl (>= 1.28),
- libfile-sharedir-perl (>= 1.00), libfile-homedir-perl (>= 0.69),
- liblwp-online-perl, libpod-simple-perl (>= 3.07),
- libparams-util-perl (>= 0.33), libfile-remove-perl (>= 1.42),
+Build-Depends-Indep: perl, libtest-cpan-meta-perl, libtest-minimumversion-perl,
+ libwww-perl (>= 5.806), libtest-pod-perl (>= 1.26), liborlite-perl (>= 1.30),
+ liburi-perl, libparams-util-perl (>= 0.33), libfile-remove-perl (>= 1.42),
+ perl (>= 5.10.1) | libio-compress-bzip2-perl (>= 2.008), liblwp-online-perl,
+ libfile-sharedir-perl (>= 1), libfile-homedir-perl (>= 0.69),
+ perl (>= 5.10.1) | libpod-simple-perl (>= 3.07),
  perl (>= 5.10.1) | libio-compress-zlib-perl (>= 2.011)
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Jonathan Yu <jawnsy at cpan.org>,
- gregor herrmann <gregoa at debian.org>
+Uploaders: Jonathan Yu <jawnsy at cpan.org>, gregor herrmann <gregoa at debian.org>
 Standards-Version: 3.8.3
 Homepage: http://search.cpan.org/dist/ORLite-Mirror/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/liborlite-mirror-perl/
@@ -20,9 +19,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.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),
+ libfile-homedir-perl (>= 0.69), liborlite-perl (>= 1.30),
+ 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, libwww-perl (>= 5.806)
 Description: ORLite extension to use remote SQLite databases
  ORLite::Mirror provides a simple mechanism for opening a read-only SQLite

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=49935&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/lib/ORLite/Mirror.pm (original)
+++ trunk/liborlite-mirror-perl/lib/ORLite/Mirror.pm Sat Jan  2 17:09:09 2010
@@ -14,11 +14,11 @@
 use IO::Uncompress::Bunzip2 2.008 ();
 use LWP::UserAgent          5.806 ();
 use LWP::Online              1.07 ();
-use ORLite                   1.28 ();
+use ORLite                   1.30 ();
 
 use vars qw{$VERSION @ISA};
 BEGIN {
-	$VERSION = '1.17';
+	$VERSION = '1.18';
 	@ISA     = 'ORLite';
 }
 
@@ -77,13 +77,13 @@
 	unless ( Params::Util::_NONNEGINT($maxage) ) {
 		Carp::croak("Invalid maxage param '$maxage'");
 	}
-	
+
 	# Find the stub database
 	my $stub = delete $params{stub};
 	if ( $stub ) {
 		$stub = File::ShareDir::module_file(
 			$params{package} => 'stub.db'
-		);
+		) if $stub eq '1';
 		unless ( -f $stub ) {
 			Carp::croak("Stub database '$stub' does not exist");
 		}
@@ -92,7 +92,7 @@
 	# Check when we should update
 	my $update = delete $params{update};
 	unless ( defined $update ) {
-		$update = 'compile';
+		$update = $stub ? 'connect' : 'compile';
 	}
 	unless ( $update =~ /^(?:compile|connect)$/ ) {
 		Carp::croak("Invalid update param '$update'");
@@ -189,7 +189,7 @@
 
 		# If we updated the file, add any extra indexes that we need
 		if ( $refreshed and $params{index} ) {
-			my $dbh = DBI->connect("DBI:SQLite:$db", undef, undef, {
+			my $dbh = DBI->connect( "DBI:SQLite:$db", undef, undef, {
 				RaiseError => 1,
 				PrintError => 1,
 			} );
@@ -208,17 +208,6 @@
 	# If and only if they update at connect-time, replace the
 	# original dbh method with one that syncs the database.
 	if ( $update eq 'connect' ) {
-		# Generate the user_version checking fragment
-		my $check_version = '';
-		if ( $params{user_version} ) {
-			$check_version = <<"END_PERL";
-	unless ( \$class->pragma('user_version') == $params{user_version} ) {
-
-	}
-
-END_PERL
-		}
-
 		# Generate the archive decompression fragment
 		my $decompress = '';
 		if ( $path =~ /\.gz$/ ) {
@@ -232,7 +221,7 @@
 
 		require IO::Uncompress::Gunzip;
 		IO::Uncompress::Gunzip::gunzip(
-			\$PATH => \$sqlite,
+			\$PATH      => \$sqlite,
 			BinModeOut => 1,
 		) or Carp::croak("Error: gunzip(\$PATH) failed");
 	}
@@ -249,7 +238,7 @@
 
 		require IO::Uncompress::Bunzip2;
 		IO::Uncompress::Bunzip2::bunzip2(
-			\$PATH => \$sqlite,
+			\$PATH      => \$sqlite,
 			BinModeOut => 1,
 		) or Carp::croak("Error: bunzip2(\$PATH) failed");
 	}
@@ -264,15 +253,16 @@
 use vars qw{ \$REFRESHED };
 BEGIN {
 	\$REFRESHED = 0;
-	delete \$$params{package}::{DBH};
+	# delete \$$params{package}::{DBH};
 }
 
 my \$URL  = '$url';
 my \$PATH = '$path';
 
 sub refresh {
-	my \$class     = shift;
-	my \%param     = \@_;
+	my \$class = shift;
+	my \%param = \@_;
+
 	require LWP::UserAgent;
 	my \$useragent = LWP::UserAgent->new(
 		agent         => '$agent',
@@ -280,6 +270,13 @@
 		show_progress => !! \$param{show_progress},
 	);
 
+	# Set the refresh flag now, so the call to ->pragma won't
+	# head off into an infinite recursion.
+	\$REFRESHED = 1;
+
+	# Save the old schema version
+	my \$old_version = \$class->pragma('user_version');
+
 	# Flush the existing database
 	require File::Remove;
 	if ( -f \$PATH and not File::Remove::remove(\$PATH) ) {
@@ -293,9 +290,12 @@
 	}
 
 $decompress
-	\$REFRESHED = 1;
-
-$check_version
+	# The new schema version must match the previous or stub version
+	my \$version = \$class->pragma('user_version');
+	unless ( \$version == \$old_version ) {
+		Carp::croak("Schema user_version mismatch (got \$version, wanted \$old_version)");
+	}
+
 	return 1;
 }
 
@@ -307,7 +307,10 @@
 			show_progress => $show_progress,
 		);
 	}
-	DBI->connect(\$class->dsn);
+	DBI->connect( \$class->dsn, undef, undef, {
+		RaiseError => 1,
+		PrintError => 0,
+	} );
 }
 END_PERL
 	}
@@ -370,7 +373,7 @@
 
 =head1 COPYRIGHT
 
-Copyright 2008 - 2009 Adam Kennedy.
+Copyright 2008 - 2010 Adam Kennedy.
 
 This program is free software; you can redistribute
 it and/or modify it under the same terms as Perl itself.

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=49935&op=diff
==============================================================================
--- trunk/liborlite-mirror-perl/t/lib/Test.pm (original)
+++ trunk/liborlite-mirror-perl/t/lib/Test.pm Sat Jan  2 17:09:09 2010
@@ -10,7 +10,7 @@
 
 use vars qw{$VERSION @ISA @EXPORT};
 BEGIN {
-	$VERSION = '1.17';
+	$VERSION = '1.18';
 	@ISA     = 'Exporter';
 	@EXPORT  = qw{ test_db mirror_db connect_ok create_ok };
 }




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