r23376 - in /trunk/libsearch-xapian-perl: Changes MANIFEST.SKIP META.yml README XS/Query.xs XS/Stem.xs Xapian.pm debian/changelog makehtmldocs t/create.t t/index.t t/parser.t t/search.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Thu Jul 17 17:30:07 UTC 2008


Author: gregoa
Date: Thu Jul 17 17:30:04 2008
New Revision: 23376

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=23376
Log:
new upstream release, still FTBFS

Modified:
    trunk/libsearch-xapian-perl/Changes
    trunk/libsearch-xapian-perl/MANIFEST.SKIP
    trunk/libsearch-xapian-perl/META.yml
    trunk/libsearch-xapian-perl/README
    trunk/libsearch-xapian-perl/XS/Query.xs
    trunk/libsearch-xapian-perl/XS/Stem.xs
    trunk/libsearch-xapian-perl/Xapian.pm
    trunk/libsearch-xapian-perl/debian/changelog
    trunk/libsearch-xapian-perl/makehtmldocs
    trunk/libsearch-xapian-perl/t/create.t
    trunk/libsearch-xapian-perl/t/index.t
    trunk/libsearch-xapian-perl/t/parser.t
    trunk/libsearch-xapian-perl/t/search.t

Modified: trunk/libsearch-xapian-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Changes?rev=23376&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Changes (original)
+++ trunk/libsearch-xapian-perl/Changes Thu Jul 17 17:30:04 2008
@@ -1,6 +1,16 @@
 Revision history for Perl extension Search::Xapian.
 
-1.0.6.0  ???
+1.0.7.0  Thu Jul 17 00:18:17 GMT 2008
+	[Changes contributed by Olly Betts]
+	- Handle exceptions from Xapian::Stem constructor (reported by Joey
+	  Hess in Debian BTS #486138).
+	- Fix testcase in t/parser.t for improved behaviour of xapian-core.
+	- Actually fill in @Search::Xapian::DB_NAMES.
+	- Search::Xapian::Query->new(<OP>, <TERMS>) now allows integers and
+	  numbers as terms - these are coerced to strings as with standard
+	  Perl parameter passing.
+
+1.0.6.0  Sun Mar 30 10:20:58 GMT 2008
 	[Changes contributed by Olly Betts]
 	- If the Search::Xapian and xapian-config versions don't match, and
 	  $ENV{AUTOMATED_TESTING} is true, then we need to unlink Makefile as

Modified: trunk/libsearch-xapian-perl/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/MANIFEST.SKIP?rev=23376&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/MANIFEST.SKIP (original)
+++ trunk/libsearch-xapian-perl/MANIFEST.SKIP Thu Jul 17 17:30:04 2008
@@ -1,17 +1,18 @@
 \.svn
 Makefile
-Makefile.old
-MANIFEST.old
-MANIFEST.bak
-MANIFEST.OLD
+Makefile\.old
+MANIFEST\.old
+MANIFEST\.bak
+MANIFEST\.OLD
 testdb
 testdb-exception
 testdb-spell
 blib
 pm_to_blib
 .*\.o
-Xapian.c
-Xapian.bs
-Xapian.lo
-Search-Xapian-[0-9.]*.tar.gz
-Search-Xapian-[0-9.]*
+Xapian\.c
+Xapian\.bs
+Xapian\.lo
+Search-Xapian-[0-9.]+\.tar\.gz
+Search-Xapian-[0-9.]+
+html

Modified: trunk/libsearch-xapian-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/META.yml?rev=23376&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/META.yml (original)
+++ trunk/libsearch-xapian-perl/META.yml Thu Jul 17 17:30:04 2008
@@ -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.6.0
+version:      1.0.7.0
 version_from: Xapian.pm
 installdirs:  site
 requires:

Modified: trunk/libsearch-xapian-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/README?rev=23376&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/README (original)
+++ trunk/libsearch-xapian-perl/README Thu Jul 17 17:30:04 2008
@@ -1,4 +1,4 @@
-Search::Xapian version 1.0.6.0
+Search::Xapian version 1.0.7.0
 ==============================
 
 This is Search::Xapian, a Perl XS frontend to the Xapian C++ search library.
@@ -14,10 +14,14 @@
 
 By default, Makefile.PL looks for xapian-config on your PATH.  You can specify
 a path for xapian-config by passing XAPIAN_CONFIG=/path/to/xapian-config on
-the command line after Makefile.PL.  You can also specify a C++ compiler by
-passing CXX=/usr/local/bin/g++ after Makefile.PL.  These values are stored
-in the generated Makefile and will be used if "make" causes "perl Makefile.PL"
-to be automatically rerun (e.g. if you modify Makefile.PL).
+the command line after Makefile.PL.  Similarly, you can specify a C++ compiler
+by passing CXX=/usr/local/bin/g++ after Makefile.PL.  For example:
+
+   perl Makefile.PL XAPIAN_CONFIG=/home/jim/bin/xapian-config CXX=g++-4.3
+
+These values are stored in the generated Makefile and will be used if "make"
+causes "perl Makefile.PL" to be automatically rerun (e.g. if you modify
+Makefile.PL).
 
 (For compatibility with Search::Xapian 1.0.3.0 and early, XAPIAN_CONFIG and
 CXX can also be specified as environmental variables.  Specifying them on the
@@ -29,13 +33,13 @@
 This module requires these other modules and libraries:
 
   The Xapian C++ search library, which can be downloaded by following
-  the instructions on http://www.xapian.org/
+  the instructions on http://xapian.org/
 
 COPYRIGHT AND LICENCE
 
 Please report any bugs/suggestions to <xapian-discuss at lists.xapian.org>
-or use the Xapian bug tracker <http://www.xapian.org/bugs/>.  Please do
-NOT use the CPAN bug tracker or mail any of the authors individually.
+or use the Xapian bug tracker <http://xapian.org/bugs>.  Please do NOT use the
+CPAN bug tracker or mail any of the authors individually.
 
 Copyright (c) 2002,2003 Alex Bowley. All rights reserved.
 Copyright (c) 2003,2004,2005,2006,2007,2008 Olly Betts. All rights reserved.

Modified: trunk/libsearch-xapian-perl/XS/Query.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/XS/Query.xs?rev=23376&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/XS/Query.xs (original)
+++ trunk/libsearch-xapian-perl/XS/Query.xs Thu Jul 17 17:30:04 2008
@@ -60,7 +60,7 @@
 		if (sv_isa(sv, "Search::Xapian::Query")) {
 		    Query *query = (Query*) SvIV((SV*) SvRV(sv));
 		    queries.push_back(*query);
-		} else if ( SvOK(sv) && SvPOK(sv) ) {
+		} else if ( SvOK(sv) ) {
 		    STRLEN len;
 		    const char * ptr = SvPV(sv, len);
 		    queries.push_back(Query(string(ptr, len)));

Modified: trunk/libsearch-xapian-perl/XS/Stem.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/XS/Stem.xs?rev=23376&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/XS/Stem.xs (original)
+++ trunk/libsearch-xapian-perl/XS/Stem.xs Thu Jul 17 17:30:04 2008
@@ -6,7 +6,11 @@
 Stem::new(language)
     string	language
     CODE:
-        RETVAL = new Stem(language);
+	try {
+	    RETVAL = new Stem(language);
+	} 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=23376&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Xapian.pm (original)
+++ trunk/libsearch-xapian-perl/Xapian.pm Thu Jul 17 17:30:04 2008
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '1.0.6.0';
+our $VERSION = '1.0.7.0';
 
 use Exporter 'import';
 
@@ -111,7 +111,7 @@
 }
 
 our @DB_NAMES;
-foreach (@{ $EXPORT_TAGS{'dbs'} }) {
+foreach (@{ $EXPORT_TAGS{'db'} }) {
   $DB_NAMES[eval $_] = $_;
 }
 
@@ -160,7 +160,7 @@
 
 There are some gaps in the POD documentation for wrapped classes, but you
 can read the Xapian C++ API documentation at
-L<http://www.xapian.org/docs/apidoc/html/annotated.html> for details of
+L<http://xapian.org/docs/apidoc/html/annotated.html> for details of
 these.  Alternatively, take a look at the code in the examples and tests.
 
 If you want to use Search::Xapian and the threads module together, make
@@ -171,7 +171,7 @@
 
 If you encounter problems, or have any comments, suggestions, patches, etc
 please email the Xapian-discuss mailing list (details of which can be found at
-L<http://www.xapian.org/lists.php>).
+L<http://xapian.org/lists>).
 
 =head2 EXPORT
 
@@ -391,7 +391,7 @@
 Alex Bowley E<lt>kilinrax at cpan.orgE<gt>
 
 Please report any bugs/suggestions to E<lt>xapian-discuss at lists.xapian.orgE<gt>
-or use the Xapian bug tracker L<http://www.xapian.org/bugs/>.  Please do
+or use the Xapian bug tracker L<http://xapian.org/bugs>.  Please do
 NOT use the CPAN bug tracker or mail any of the authors individually.
 
 =head1 SEE ALSO
@@ -413,6 +413,6 @@
 L<Search::Xapian::Weight>,
 L<Search::Xapian::WritableDatabase>,
 and
-L<http://www.xapian.org/>.
+L<http://xapian.org/>.
 
 =cut

Modified: trunk/libsearch-xapian-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/debian/changelog?rev=23376&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/debian/changelog (original)
+++ trunk/libsearch-xapian-perl/debian/changelog Thu Jul 17 17:30:04 2008
@@ -1,8 +1,8 @@
-libsearch-xapian-perl (1.0.6.0-1) UNRELEASED; urgency=low
+libsearch-xapian-perl (1.0.7.0-1) UNRELEASED; urgency=low
 
-  FTBFS: compiler errors in XS stuff (probably needs libxapian-dev 1.0.6)
+  FTBFS: compiler errors in XS stuff
   
-  * New upstream release.
+  * New upstream release (closes: #486138).
   * debian/copyright: change upstream source location.
   * debian/control:
     - add /me to Uploaders

Modified: trunk/libsearch-xapian-perl/makehtmldocs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/makehtmldocs?rev=23376&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/makehtmldocs (original)
+++ trunk/libsearch-xapian-perl/makehtmldocs Thu Jul 17 17:30:04 2008
@@ -65,7 +65,7 @@
 
 <p>No Perl-specific documentation currently exists for class
 <code>$class</code> - please refer to the
-<a href="http://www.xapian.org/docs/apidoc/html/annotated.html">C++
+<a href="http://xapian.org/docs/apidoc/html/annotated.html">C++
 API documentation</a> for now.
 </body>
 

Modified: trunk/libsearch-xapian-perl/t/create.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/t/create.t?rev=23376&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/t/create.t (original)
+++ trunk/libsearch-xapian-perl/t/create.t Thu Jul 17 17:30:04 2008
@@ -3,32 +3,26 @@
 
 #########################
 
-# change 'tests => 1' to 'tests => last_test_to_print';
+use Test::More;
+BEGIN { plan tests => 4 };
+use Search::Xapian qw(:standard);
 
-use Test;
-use Devel::Peek;
-BEGIN { plan tests => 3 };
-use Search::Xapian qw(:standard);
 ok(1); # If we made it this far, we're ok.
 
 #########################
 
-# Insert your test code below, the Test module is use()ed here so read
-# its man page ( perldoc Test ) for help writing this test script.
-
-# first create database dir, if it doesn't exist;
 my $db_dir = 'testdb';
 
-if( (! -e $db_dir) or (! -d $db_dir) ) {
-  mkdir( $db_dir );
+# Delete contents of database dir, if it exists.
+if (opendir( DB_DIR, $db_dir )) {
+  while( defined( my $file = readdir( DB_DIR ) ) ) {
+    next if $file =~ /^\.+$/;
+    unlink( "$db_dir/$file" ) or die "Could not delete '$db_dir/$file': $!";
+  }
+  closedir( DB_DIR );
 }
 
-opendir( DB_DIR, $db_dir );
-while( defined( my $file = readdir( DB_DIR ) ) ) {
-  next if $file =~ /^\.+$/;
-  unlink( "$db_dir/$file" ) or die "Could not delete '$db_dir/$file': $!";
-}
-closedir( DB_DIR );
+is( $Search::Xapian::DB_NAMES[Search::Xapian::DB_CREATE], "DB_CREATE" );
 
 my $database;
 ok( $database = Search::Xapian::WritableDatabase->new( $db_dir, Search::Xapian::DB_CREATE ) );

Modified: trunk/libsearch-xapian-perl/t/index.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/t/index.t?rev=23376&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/t/index.t (original)
+++ trunk/libsearch-xapian-perl/t/index.t Thu Jul 17 17:30:04 2008
@@ -6,7 +6,7 @@
 # change 'tests => 1' to 'tests => last_test_to_print';
 
 use Test::More;
-BEGIN { plan tests => 76 };
+BEGIN { plan tests => 77 };
 use Search::Xapian qw(:standard);
 
 #########################
@@ -86,4 +86,11 @@
   is( $database->get_metadata( "foo" ), "bar" );
 }
 
+# Check that trying to create an invalid stemmer gives an exception, not an
+# abort.
+eval {
+  my $badstem = Search::Xapian::Stem->new( 'gibberish' );
+};
+ok( $@ =~ /^Exception: Language code gibberish unknown at \S+ line \d+\.$/ );
+
 1;

Modified: trunk/libsearch-xapian-perl/t/parser.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/t/parser.t?rev=23376&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/t/parser.t (original)
+++ trunk/libsearch-xapian-perl/t/parser.t Thu Jul 17 17:30:04 2008
@@ -135,7 +135,7 @@
 # called.
 $qp = Search::Xapian::QueryParser->new;
 eval {
-    $qp->parse_query('foo other* this AND more', FLAG_BOOLEAN|FLAG_WILDCARD);
+    $qp->parse_query('other* AND', FLAG_BOOLEAN|FLAG_WILDCARD);
 };
 ok( $@ =~ /^Exception: Syntax: <expression> AND <expression> at \S+ line \d+\.$/ );
 

Modified: trunk/libsearch-xapian-perl/t/search.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/t/search.t?rev=23376&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/t/search.t (original)
+++ trunk/libsearch-xapian-perl/t/search.t Thu Jul 17 17:30:04 2008
@@ -6,7 +6,7 @@
 # change 'tests => 1' to 'tests => last_test_to_print';
 
 use Test::More;
-BEGIN { plan tests => 108 };
+BEGIN { plan tests => 109 };
 use Search::Xapian qw(:ops);
 
 #########################
@@ -158,4 +158,8 @@
 ok( "$alltermit" eq 'two' );
 ok( ++$alltermit == $db->allterms_end('t') );
 
+# Check that non-string scalars get coerced.
+my $numberquery = Search::Xapian::Query->new( OP_OR, (12, "34", .5) );
+is( $numberquery->get_description(), "Xapian::Query((12 OR 34 OR 0.5))" );
+
 1;




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