Hello community,
here is the log from the commit of package perl-DBD-XBase for openSUSE:Factory checked in at 2013-06-05 13:33:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-DBD-XBase (Old)
and /work/SRC/openSUSE:Factory/.perl-DBD-XBase.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-DBD-XBase"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-DBD-XBase/perl-DBD-XBase.changes 2011-11-21 12:38:59.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-DBD-XBase.new/perl-DBD-XBase.changes 2013-06-05 13:33:50.000000000 +0200
@@ -1,0 +2,8 @@
+Tue Jun 4 07:20:25 UTC 2013 - coolo@suse.com
+
+- updated to 1.05
+ Fix for prepare_select_eq and empty MDX indexes, patch by Julian
+ Bridle.
+ Fix for handling MDX indexes, patch by Julian Bridle.
+
+-------------------------------------------------------------------
Old:
----
DBD-XBase-1.03.tar.gz
New:
----
DBD-XBase-1.05.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-DBD-XBase.spec ++++++
--- /var/tmp/diff_new_pack.U0XuRe/_old 2013-06-05 13:33:51.000000000 +0200
+++ /var/tmp/diff_new_pack.U0XuRe/_new 2013-06-05 13:33:51.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-DBD-XBase
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,21 +15,18 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
-
Name: perl-DBD-XBase
BuildRequires: perl-DBI
BuildRequires: perl-macros
-Version: 1.03
-Release: 1
+Version: 1.05
+Release: 0
Obsoletes: dbdxbase
Provides: dbdxbase
-AutoReqProv: on
-Group: Development/Libraries/Perl
-License: Artistic-1.0
Url: http://cpan.org/modules/by-module/DBD/
Summary: Provides Access to XBase Files
+License: Artistic-1.0
+Group: Development/Libraries/Perl
Source: http://www.cpan.org/authors/id/JANPAZ/DBD-XBase-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
@@ -38,10 +35,6 @@
Module XBase provides access to XBase (dBase, Fox*) database files,
namely dbf, dbt, fpt, ndx, ntx, mdx, idx and cdx.
-Authors:
---------
- Jan Pazdziora
-
%prep
%setup -n DBD-XBase-%{version}
++++++ DBD-XBase-1.03.tar.gz -> DBD-XBase-1.05.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-XBase-1.03/Changes new/DBD-XBase-1.05/Changes
--- old/DBD-XBase-1.03/Changes 2011-03-06 07:32:41.000000000 +0100
+++ new/DBD-XBase-1.05/Changes 2013-04-24 19:37:43.000000000 +0200
@@ -1,7 +1,13 @@
Revision history for Perl extension XBase and DBD::XBase.
+1.05 Wed Apr 24 19:37:09 CEST 2013
+ Fix for prepare_select_eq and empty MDX indexes, patch by Julian
+ Bridle.
+1.04 Wed Apr 17 19:47:21 CEST 2013
+ Fix for handling MDX indexes, patch by Julian Bridle.
+
1.03 Sun Mar 6 07:32:21 CET 2011
Fixing output of tests when DBI is not available.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-XBase-1.03/MANIFEST new/DBD-XBase-1.05/MANIFEST
--- old/DBD-XBase-1.03/MANIFEST 2003-07-07 20:30:41.000000000 +0200
+++ new/DBD-XBase-1.05/MANIFEST 2013-04-17 20:15:01.000000000 +0200
@@ -67,3 +67,4 @@
t/test.dbt
t/types.dbf
META.yml Module meta-data (added by MakeMaker)
+META.json Module JSON meta-data (added by MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-XBase-1.03/META.json new/DBD-XBase-1.05/META.json
--- old/DBD-XBase-1.03/META.json 1970-01-01 01:00:00.000000000 +0100
+++ new/DBD-XBase-1.05/META.json 2013-04-24 19:37:59.000000000 +0200
@@ -0,0 +1,39 @@
+{
+ "abstract" : "Reads and writes XBase (dbf) files, includes DBI support",
+ "author" : [
+ "Jan Pazdziora"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.120921",
+ "license" : [
+ "unknown"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "DBD-XBase",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {}
+ }
+ },
+ "release_status" : "stable",
+ "version" : "1.05"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-XBase-1.03/META.yml new/DBD-XBase-1.05/META.yml
--- old/DBD-XBase-1.03/META.yml 2011-03-06 07:33:09.000000000 +0100
+++ new/DBD-XBase-1.05/META.yml 2013-04-24 19:37:59.000000000 +0200
@@ -1,21 +1,21 @@
---- #YAML:1.0
-name: DBD-XBase
-version: 1.03
-abstract: Reads and writes XBase (dbf) files, includes DBI support
+---
+abstract: 'Reads and writes XBase (dbf) files, includes DBI support'
author:
- - Jan Pazdziora
-license: unknown
-distribution_type: module
-configure_requires:
- ExtUtils::MakeMaker: 0
+ - 'Jan Pazdziora'
build_requires:
- ExtUtils::MakeMaker: 0
-requires: {}
-no_index:
- directory:
- - t
- - inc
-generated_by: ExtUtils::MakeMaker version 6.55_02
+ ExtUtils::MakeMaker: 0
+configure_requires:
+ ExtUtils::MakeMaker: 0
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.120921'
+license: unknown
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: DBD-XBase
+no_index:
+ directory:
+ - t
+ - inc
+requires: {}
+version: 1.05
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-XBase-1.03/bin/indexdump.PL new/DBD-XBase-1.05/bin/indexdump.PL
--- old/DBD-XBase-1.03/bin/indexdump.PL 2011-03-03 20:37:34.000000000 +0100
+++ new/DBD-XBase-1.05/bin/indexdump.PL 2013-04-17 20:27:33.000000000 +0200
@@ -50,6 +50,15 @@
my $file = shift;
if (@ARGV and not defined $opts{'tag'}) { $opts{'tag'} = shift; }
my $index = new XBase::Index $file, %opts or die XBase::Index->errstr;
+if (not defined $opts{'tag'}) {
+ my @tags = $index->tags;
+ if (@tags) {
+ print map "$_\n", @tags;
+ my $numtags = @tags;
+ print "Number of tags: $numtags\n" if $showtotal;
+ exit;
+ }
+}
if (defined $startvalue) {
$index->prepare_select_eq($startvalue) or die $index->errstr;
@@ -108,7 +117,7 @@
=head1 AUTHOR
-(c) 1999--2011 Jan Pazdziora.
+(c) 1999--2013 Jan Pazdziora.
=head1 SEE ALSO
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-XBase-1.03/lib/DBD/XBase.pm new/DBD-XBase-1.05/lib/DBD/XBase.pm
--- old/DBD-XBase-1.03/lib/DBD/XBase.pm 2011-03-06 07:33:01.000000000 +0100
+++ new/DBD-XBase-1.05/lib/DBD/XBase.pm 2013-04-24 19:35:43.000000000 +0200
@@ -19,7 +19,7 @@
use vars qw( $VERSION @ISA @EXPORT $err $errstr $drh $sqlstate );
# a couple of global variables that may come handy
-$VERSION = '1.03';
+$VERSION = '1.05';
$err = 0;
$errstr = '';
@@ -764,7 +764,7 @@
=head1 VERSION
-1.03
+1.05
=head1 AVAILABLE FROM
@@ -772,7 +772,7 @@
=head1 AUTHOR
-(c) 1997--2011 Jan Pazdziora.
+(c) 1997--2013 Jan Pazdziora.
Contact the author at jpx dash perl at adelton dot com.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-XBase-1.03/lib/XBase/Index.pm new/DBD-XBase-1.05/lib/XBase/Index.pm
--- old/DBD-XBase-1.03/lib/XBase/Index.pm 2011-03-03 20:37:54.000000000 +0100
+++ new/DBD-XBase-1.05/lib/XBase/Index.pm 2013-04-24 19:35:39.000000000 +0200
@@ -11,7 +11,7 @@
use XBase::Base;
@ISA = qw( XBase::Base );
-$VERSION = '1.02';
+$VERSION = '1.05';
$DEBUG = 0;
@@ -216,9 +216,11 @@
}
my $row = 0;
my ($key, $val);
+ my $empty = 1;
while (($key, $val, my $newleft) = $page->get_key_val_left($row)) {
### { local $^W = 0; print "Got: $key, $val, $newleft ($numdate)\n"; }
+ $empty = 0; # There is at least 1 key
$left = $newleft;
# Joe Campbell says:
# Compound char keys have two parts preceded by white space
@@ -241,7 +243,7 @@
$self->{'rows'}[$level] = $row;
# if there is no lower level
- if (not defined $left) {
+ if ($empty or not defined $left) {
$self->{'rows'}[$level] = ( $row ? $row - 1: undef);
$self->{'level'} = $level;
last;
@@ -837,6 +839,7 @@
= unpack 'VA11ccccca1', $header;
$self->{'tags'}{$tag->{'tag_name'}} = $tag;
+ $expr_name ||= $tag->{'tag_name'}; # Default to first tag
$self->seek_to($tag->{'header_page'} * 512) or do
{ __PACKAGE__->Error($self->errstr); return; };
@@ -852,9 +855,13 @@
### use Data::Dumper; print Dumper $self;
- if (defined $expr_name and defined $self->{'tags'}{$expr_name}) {
- $self->{'active'} = $self->{'tags'}{$expr_name};
- $self->{'start_page'} = $self->{'active'}{'start_page'};
+ if (defined $expr_name) {
+ if (defined $self->{'tags'}{$expr_name}) {
+ $self->{'active'} = $self->{'tags'}{$expr_name};
+ $self->{'start_page'} = $self->{'active'}{'start_page'};
+ } else {
+ __PACKAGE__->Error("No tag $expr_name found in index file $self->{'filename'}.\n"); return;
+ }
}
$self;
@@ -864,6 +871,11 @@
-1;
}
+sub tags {
+ my $self = shift;
+ return sort keys %{$self->{'tags'}} if defined $self->{'tags'};
+}
+
package XBase::mdx::Page;
use strict;
use vars qw( @ISA $DEBUG );
@@ -892,11 +904,8 @@
my ($noentries, $noleaf) = unpack 'VV', $data;
print "page $num, noentries $noentries, keylength $keylength; noleaf: $noleaf\n" if $DEBUG;
- if ($noleaf == 54 or $noleaf == 20 or $noleaf == 32 or $noleaf == 80) {
- $noentries++;
- }
- my ($keys, $values, $lefts) = ([], [], []);
+ my ($keys, $values, $lefts, $refs) = ([], [], [], []);
for (my $i = 0; $i < $noentries; $i++) {
my ($left, $key)
@@ -904,14 +913,25 @@
push @$keys, $key;
- if ($noleaf == 54 or $noleaf == 20 or $noleaf == 32 or
- $noleaf == 80)
- { push @$lefts, $left; }
- else
- { push @$values, $left; }
+ push @$refs, $left;
+
$offset += $keyreclength;
}
+ my $right;
+
+ $right = unpack "\@${offset}V", $data if $offset <= (1024-4);
+
+ if ($right) {
+ # It's a branch page and the next ref is for values > last key
+ push @$keys, "";
+ push @$refs, $right;
+ $lefts = $refs;
+ } else {
+ # It's a leaf page
+ $values = $refs;
+ }
+
my $self = bless { 'num' => $num, 'indexfile' => $indexfile,
'keys' => $keys, 'values' => $values, 'lefts' => $lefts, },
__PACKAGE__;
@@ -987,6 +1007,7 @@
$self->prepare_select;
while (my ($tag) = $self->fetch) {
push @{$self->{'tags'}}, $tag;
+ $opts{'tag'} ||= $tag; # Default to first tag
}
}
### use Data::Dumper; print Dumper \%opts;
@@ -1792,7 +1813,7 @@
=head1 VERSION
-1.02
+1.05
=head1 AVAILABLE FROM
@@ -1800,7 +1821,7 @@
=head1 AUTHOR
-(c) 1998--2011 Jan Pazdziora.
+(c) 1998--2013 Jan Pazdziora.
=head1 SEE ALSO
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org