r33842 - in /trunk/libsearch-xapian-perl: Changes MANIFEST MANIFEST.SKIP META.yml Makefile.PL README XS/Database.xs XS/Enquire.xs Xapian.pm debian/changelog t/thread.t t/writabledatabase.t

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Fri Apr 24 02:55:10 UTC 2009


Author: ryan52-guest
Date: Fri Apr 24 02:55:03 2009
New Revision: 33842

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=33842
Log:
New upstream release

Added:
    trunk/libsearch-xapian-perl/t/writabledatabase.t
      - copied unchanged from r33841, branches/upstream/libsearch-xapian-perl/current/t/writabledatabase.t
Modified:
    trunk/libsearch-xapian-perl/Changes
    trunk/libsearch-xapian-perl/MANIFEST
    trunk/libsearch-xapian-perl/MANIFEST.SKIP
    trunk/libsearch-xapian-perl/META.yml
    trunk/libsearch-xapian-perl/Makefile.PL
    trunk/libsearch-xapian-perl/README
    trunk/libsearch-xapian-perl/XS/Database.xs
    trunk/libsearch-xapian-perl/XS/Enquire.xs
    trunk/libsearch-xapian-perl/Xapian.pm
    trunk/libsearch-xapian-perl/debian/changelog
    trunk/libsearch-xapian-perl/t/thread.t

Modified: trunk/libsearch-xapian-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Changes?rev=33842&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Changes (original)
+++ trunk/libsearch-xapian-perl/Changes Fri Apr 24 02:55:03 2009
@@ -1,6 +1,17 @@
 Revision history for Perl extension Search::Xapian.
 
-1.0.11.0  Sun Mar 15 12:53:20 GMT 2008
+1.0.12.0  Sun Apr 19 11:18:04 GMT 2009
+	[Changes contributed by Olly Betts] 
+	- Add handling of exceptions from Database::get_metadata() and methods
+	  of Enquire which might throw DatabaseModifiedError to address
+	  situation reported in ticket#284.
+	- Skip thread.t testcase if Perl is new enough, but wasn't built with
+	  thread support (reported by Felix Antonius Wilhelm Ostmann).
+	- Fix "fake VPATH" mode to work better.
+	[Changes contributed by Kosei Moriyama]
+	- Add test coverage for more WritableDatabase methods.
+
+1.0.11.0  Sun Mar 15 12:53:20 GMT 2009
 	[Changes contributed by Olly Betts]
 	- Wrap the new FLAG_DEFAULT constant which gives the QueryParser
 	  default flag settings, allowing you to easily add flags to the

Modified: trunk/libsearch-xapian-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/MANIFEST?rev=33842&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/MANIFEST (original)
+++ trunk/libsearch-xapian-perl/MANIFEST Fri Apr 24 02:55:03 2009
@@ -82,6 +82,7 @@
 t/thread.t
 t/tied.t
 t/valuerange.t
+t/writabledatabase.t
 
 examples/simplesearch.pl
 META.yml                                 Module meta-data (added by MakeMaker)

Modified: trunk/libsearch-xapian-perl/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/MANIFEST.SKIP?rev=33842&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/MANIFEST.SKIP (original)
+++ trunk/libsearch-xapian-perl/MANIFEST.SKIP Fri Apr 24 02:55:03 2009
@@ -7,6 +7,7 @@
 testdb
 testdb-exception
 testdb-spell
+testdb-writabledatabase
 blib
 pm_to_blib
 .*\.o

Modified: trunk/libsearch-xapian-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/META.yml?rev=33842&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/META.yml (original)
+++ trunk/libsearch-xapian-perl/META.yml Fri Apr 24 02:55:03 2009
@@ -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:         Search-Xapian
-version:      1.0.11.0
+version:      1.0.12.0
 version_from: Xapian.pm
 installdirs:  site
 requires:

Modified: trunk/libsearch-xapian-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Makefile.PL?rev=33842&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Makefile.PL (original)
+++ trunk/libsearch-xapian-perl/Makefile.PL Fri Apr 24 02:55:03 2009
@@ -9,7 +9,7 @@
 my $builddir;
 
 my $srcdir = $0;
-if ($srcdir =~ s!/.*!!) {
+if ($srcdir =~ s!/[^/]*$!!) {
     chomp($builddir = `pwd`);
     chdir $srcdir;
 }
@@ -74,9 +74,9 @@
 my $libs = `$xapian_config --libs 2> /dev/null`;
 chomp($libs);
 my ($xapian_config_dir) = $xapian_config =~ /^(.*?)[^\/]*$/;
-if ($? || -f "$xapian_config_dir/Makefile") {
+if ($? || -f "${xapian_config_dir}Makefile") {
     # Assume we're being asked to build against an uninstalled xapian-core.
-    my $libtool = "$xapian_config_dir/libtool";
+    my $libtool = "${xapian_config_dir}libtool";
     unless (-x $libtool) {
 	die "You've asked me to link against what appears to be an uninstalled xapian-core tree, but I can't find libtool in that tree\n";
     }
@@ -187,10 +187,10 @@
 if (defined $builddir) {
     open M, '>', "$builddir/Makefile~" or die $!;
     print M <<"EOF";
-.DEFAULT:
+all .DEFAULT:
 \t\$(MAKE) -C "$srcdir" \$\@
 
-.PHONY: Search-Xapian-$VERSION.tar.gz
+.PHONY: all Search-Xapian-$VERSION.tar.gz
 
 dist tardist Search-Xapian-$VERSION.tar.gz:
 \t\$(MAKE) -C "$srcdir" \$\@

Modified: trunk/libsearch-xapian-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/README?rev=33842&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/README (original)
+++ trunk/libsearch-xapian-perl/README Fri Apr 24 02:55:03 2009
@@ -1,4 +1,4 @@
-Search::Xapian version 1.0.11.0
+Search::Xapian version 1.0.12.0
 ===============================
 
 This is Search::Xapian, a Perl XS frontend to the Xapian C++ search library.

Modified: trunk/libsearch-xapian-perl/XS/Database.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/XS/Database.xs?rev=33842&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/XS/Database.xs (original)
+++ trunk/libsearch-xapian-perl/XS/Database.xs Fri Apr 24 02:55:03 2009
@@ -279,6 +279,15 @@
 
 string
 Database::get_metadata(string key)
+    CODE:
+	try {
+	    RETVAL = THIS->get_metadata(key);
+	}
+        catch (const Error &error) {
+            croak( "Exception: %s", error.get_msg().c_str() );
+        }
+    OUTPUT:
+        RETVAL
 
 void
 Database::DESTROY()

Modified: trunk/libsearch-xapian-perl/XS/Enquire.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/XS/Enquire.xs?rev=33842&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/XS/Enquire.xs (original)
+++ trunk/libsearch-xapian-perl/XS/Enquire.xs Fri Apr 24 02:55:03 2009
@@ -139,26 +139,30 @@
     RSet *	rset
     SV *	func
     CODE:
-	MSet mset;
-	switch (items) { /* items includes the hidden this pointer */
-	    case 3:
-		mset = THIS->get_mset(first, maxitems);
-		break;
-	    case 4:
-		mset = THIS->get_mset(first, maxitems, checkatleast);
-		break;
-	    case 5:
-		mset = THIS->get_mset(first, maxitems, checkatleast, rset);
-		break;
-	    case 6: {
-		perlMatchDecider d = perlMatchDecider(func);
-		mset = THIS->get_mset(first, maxitems, checkatleast, rset, &d);
-		break;
+	try {
+	    MSet mset;
+	    switch (items) { /* items includes the hidden this pointer */
+		case 3:
+		    mset = THIS->get_mset(first, maxitems);
+		    break;
+		case 4:
+		    mset = THIS->get_mset(first, maxitems, checkatleast);
+		    break;
+		case 5:
+		    mset = THIS->get_mset(first, maxitems, checkatleast, rset);
+		    break;
+		case 6: {
+		    perlMatchDecider d = perlMatchDecider(func);
+		    mset = THIS->get_mset(first, maxitems, checkatleast, rset, &d);
+		    break;
+		}
+		default:
+		    croak("Bad parameter count for get_mset1");
 	    }
-	    default:
-		croak("Bad parameter count for get_mset1");
-	}
-	RETVAL = new MSet(mset);
+	    RETVAL = new MSet(mset);
+	} catch (const Error &error) {
+	    croak( "Exception: %s", error.get_msg().c_str() );
+	}
     OUTPUT:
 	RETVAL
 
@@ -168,8 +172,12 @@
     doccount    maxitems
     SV *	func
     CODE:
-	perlMatchDecider d = perlMatchDecider(func);
-	RETVAL = new MSet(THIS->get_mset(first, maxitems, 0, NULL, &d));
+	try {
+	    perlMatchDecider d = perlMatchDecider(func);
+	    RETVAL = new MSet(THIS->get_mset(first, maxitems, 0, NULL, &d));
+	} catch (const Error &error) {
+	    croak( "Exception: %s", error.get_msg().c_str() );
+	}
     OUTPUT:
 	RETVAL
 
@@ -178,14 +186,22 @@
     doccount    maxitems
     RSet *      rset
     CODE:
-        RETVAL = new ESet(THIS->get_eset(maxitems, *rset));
+	try {
+	    RETVAL = new ESet(THIS->get_eset(maxitems, *rset));
+	} catch (const Error &error) {
+	    croak( "Exception: %s", error.get_msg().c_str() );
+	}
     OUTPUT:
         RETVAL
 
 TermIterator *
 Enquire::get_matching_terms_begin1(docid did)
     CODE:
-        RETVAL = new TermIterator(THIS->get_matching_terms_begin(did));
+	try {
+	    RETVAL = new TermIterator(THIS->get_matching_terms_begin(did));
+	} catch (const Error &error) {
+	    croak( "Exception: %s", error.get_msg().c_str() );
+	}
     OUTPUT:
         RETVAL
 
@@ -193,7 +209,11 @@
 Enquire::get_matching_terms_begin2(it)
         MSetIterator *        it
     CODE:
-        RETVAL = new TermIterator(THIS->get_matching_terms_begin(* it));
+	try {
+	    RETVAL = new TermIterator(THIS->get_matching_terms_begin(* it));
+	} catch (const Error &error) {
+	    croak( "Exception: %s", error.get_msg().c_str() );
+	}
     OUTPUT:
         RETVAL
 

Modified: trunk/libsearch-xapian-perl/Xapian.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Xapian.pm?rev=33842&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Xapian.pm (original)
+++ trunk/libsearch-xapian-perl/Xapian.pm Fri Apr 24 02:55:03 2009
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '1.0.11.0';
+our $VERSION = '1.0.12.0';
 
 use Exporter 'import';
 
@@ -36,10 +36,6 @@
 require DynaLoader;
 
 our @ISA = qw(DynaLoader);
-
-# Items to export into caller's namespace by default. Note: do not export
-# names by default without a very good reason. Use EXPORT_OK instead.
-# Do not simply export all your public functions/methods/constants.
 
 # This allows declaration	use Search::Xapian ':all';
 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
@@ -98,8 +94,10 @@
 $EXPORT_TAGS{all} = [ @{ $EXPORT_TAGS{'standard'} }, @{ $EXPORT_TAGS{'enq_order'} } ];
 
 
+# Names which can be exported.
 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
 
+# Don't export any names by default.
 our @EXPORT = qw( );
 
 bootstrap Search::Xapian $VERSION;

Modified: trunk/libsearch-xapian-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/debian/changelog?rev=33842&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/debian/changelog (original)
+++ trunk/libsearch-xapian-perl/debian/changelog Fri Apr 24 02:55:03 2009
@@ -1,4 +1,4 @@
-libsearch-xapian-perl (1.0.11.0-1) UNRELEASED; urgency=low
+libsearch-xapian-perl (1.0.12.0-1) UNRELEASED; urgency=low
 
   NOTE: needs xapian-core 1.0.11 to be uploaded frist
 
@@ -11,8 +11,9 @@
   * update debian/copyright
   * standards version 3.8.1
   * update version of dependency on libxapian-dev
+  * New upstream release
 
- -- Ryan Niebur <ryanryan52 at gmail.com>  Sun, 15 Mar 2009 18:06:04 -0700
+ -- Ryan Niebur <ryanryan52 at gmail.com>  Thu, 23 Apr 2009 19:54:53 -0700
 
 libsearch-xapian-perl (1.0.10.0-1) unstable; urgency=low
 

Modified: trunk/libsearch-xapian-perl/t/thread.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/t/thread.t?rev=33842&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/t/thread.t (original)
+++ trunk/libsearch-xapian-perl/t/thread.t Fri Apr 24 02:55:03 2009
@@ -6,14 +6,21 @@
 
 use Test::More;
 if ($] < 5.008007) {
-    plan skip_all => 'Test requires Perl >= 5.8.7';
-} else {
-    # Number of test cases to run - increase this if you add more testcases.
-    plan tests => 65;
+    # Perl 5.8.7 added CLONE_SKIP which is required to implement the behaviour
+    # which this test case tests.
+    plan skip_all => 'Test requires Perl >= 5.8.7 for CLONE_SKIP';
+}
+eval {
+    require threads;
+};
+if ($@) {
+    plan skip_all => 'Test requires Perl with thread support';
 }
 
+# Number of test cases to run - increase this if you add more testcases.
+plan tests => 65;
+
 use Search::Xapian qw(:standard);
-use threads;
 
 # TODO: check these classes too:
 # MSet/Tied.pm




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