r30798 - in /trunk/libconfig-augeas-perl: Build.PL ChangeLog META.yml debian/changelog lib/Config/Augeas.pm lib/Config/Augeas.xs t/Config-AugeasC.t
ddumont-guest at users.alioth.debian.org
ddumont-guest at users.alioth.debian.org
Wed Feb 18 12:08:26 UTC 2009
Author: ddumont-guest
Date: Wed Feb 18 12:08:23 2009
New Revision: 30798
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=30798
Log:
new upstream release
Modified:
trunk/libconfig-augeas-perl/Build.PL
trunk/libconfig-augeas-perl/ChangeLog
trunk/libconfig-augeas-perl/META.yml
trunk/libconfig-augeas-perl/debian/changelog
trunk/libconfig-augeas-perl/lib/Config/Augeas.pm
trunk/libconfig-augeas-perl/lib/Config/Augeas.xs
trunk/libconfig-augeas-perl/t/Config-AugeasC.t
Modified: trunk/libconfig-augeas-perl/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-augeas-perl/Build.PL?rev=30798&op=diff
==============================================================================
--- trunk/libconfig-augeas-perl/Build.PL (original)
+++ trunk/libconfig-augeas-perl/Build.PL Wed Feb 18 12:08:23 2009
@@ -22,7 +22,7 @@
# snatched from ExtUtils::PkgConfig
# don't go any further if pkg-config cannot be found.
-my $have_pkg_config = `pkg-config --version`;
+my $have_pkg_config = eval {`pkg-config --version`; };
if ($have_pkg_config eq "") {
# Warn and exit with status 0 to indicate (to the user and the CPAN
@@ -54,11 +54,11 @@
my $aug_version = `pkg-config --modversion augeas` ;
chomp($aug_cflags, $aug_libs, $aug_version) ;
-if ( not defined $aug_version or ( $aug_version lt '0.3.4')) {
+if ( not defined $aug_version or ( $aug_version lt '0.4.0')) {
warn << "EOW2" ;
***
*** 'pkg-config' did find augeas version $aug_version but
-*** version 0.3.4 minimum is required
+*** version 0.4.0 minimum is required
***
EOW2
exit 0;
Modified: trunk/libconfig-augeas-perl/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-augeas-perl/ChangeLog?rev=30798&op=diff
==============================================================================
--- trunk/libconfig-augeas-perl/ChangeLog (original)
+++ trunk/libconfig-augeas-perl/ChangeLog Wed Feb 18 12:08:23 2009
@@ -1,3 +1,12 @@
+2009-02-17 Dominique Dumont <dominique.dumont at hp.com> v0.400
+
+ * lib/Config/Augeas.xs (match): dies if aug_match returns -1. Perl
+ programmer can choose to trap this failure with eval or Error
+ module.
+
+ * lib/Config/Augeas.pm (match): cleanup trailing slashes in
+ path (required by new behavior of Augeas 0.4.0)
+
2009-01-02 Domi <domi at bilbo.maison> v0.305
* t/Config-AugeasC.t: Removed test involving AUGROOT environment
Modified: trunk/libconfig-augeas-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-augeas-perl/META.yml?rev=30798&op=diff
==============================================================================
--- trunk/libconfig-augeas-perl/META.yml (original)
+++ trunk/libconfig-augeas-perl/META.yml Wed Feb 18 12:08:23 2009
@@ -1,6 +1,6 @@
---
name: Config-Augeas
-version: 0.305
+version: 0.400
author:
- Dominique Dumont (ddumont at cpan dot org)
abstract: Edit configuration files through Augeas C library
@@ -13,7 +13,7 @@
provides:
Config::Augeas:
file: lib/Config/Augeas.pm
- version: 0.305
+ version: 0.400
generated_by: Module::Build version 0.3
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.2.html
Modified: trunk/libconfig-augeas-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-augeas-perl/debian/changelog?rev=30798&op=diff
==============================================================================
--- trunk/libconfig-augeas-perl/debian/changelog (original)
+++ trunk/libconfig-augeas-perl/debian/changelog Wed Feb 18 12:08:23 2009
@@ -1,3 +1,10 @@
+libconfig-augeas-perl (0.400-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ See http://search.cpan.org/src/DDUMONT/Config-Augeas-0.400/ChangeLog
+
+ -- Dominique Dumont <domi at komarr.gre.hp.com> Wed, 18 Feb 2009 13:00:34 +0100
+
libconfig-augeas-perl (0.305-1) unstable; urgency=low
* New upstream release (should fix FTBS on amd64)
Modified: trunk/libconfig-augeas-perl/lib/Config/Augeas.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-augeas-perl/lib/Config/Augeas.pm?rev=30798&op=diff
==============================================================================
--- trunk/libconfig-augeas-perl/lib/Config/Augeas.pm (original)
+++ trunk/libconfig-augeas-perl/lib/Config/Augeas.pm Wed Feb 18 12:08:23 2009
@@ -22,7 +22,7 @@
use Carp;
use IO::File ;
-our $VERSION = '0.305';
+our $VERSION = '0.400';
require XSLoader;
XSLoader::load('Config::Augeas', $VERSION);
@@ -170,6 +170,7 @@
return 1 if $ret == 0;
+ $self -> print('/augeas') ;
croak __PACKAGE__," set: error with path $path";
}
@@ -207,6 +208,7 @@
return 1 if $ret == 0;
+ $self->print('/augeas') ;
croak __PACKAGE__," insert: error with path $path";
}
@@ -271,7 +273,10 @@
my $self = shift ;
my $pattern = shift || croak __PACKAGE__," match: undefined pattern";
+ # Augeas 0.4.0 is a little picky about trailing slashes
+ $pattern =~ s!/$!!;
return $self->{aug_c} -> match($pattern) ;
+
}
=head2 count_match ( pattern )
@@ -285,6 +290,8 @@
my $self = shift ;
my $pattern = shift || croak __PACKAGE__," count_match: undefined pattern";
+ # Augeas 0.4.0 is a little picky about trailing slashes
+ $pattern =~ s!/$!!;
return $self->{aug_c} -> count_match($pattern) ;
}
Modified: trunk/libconfig-augeas-perl/lib/Config/Augeas.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-augeas-perl/lib/Config/Augeas.xs?rev=30798&op=diff
==============================================================================
--- trunk/libconfig-augeas-perl/lib/Config/Augeas.xs (original)
+++ trunk/libconfig-augeas-perl/lib/Config/Augeas.xs Wed Feb 18 12:08:23 2009
@@ -22,6 +22,8 @@
#define NEED_newCONSTSUB
#include "ppport.h"
+#include <string.h>
+#include <stdio.h>
#include <augeas.h>
typedef augeas Config_Augeas ;
@@ -102,15 +104,28 @@
Config_Augeas *aug
const char *pattern
PREINIT:
- char** matches;
+ char** matches;
+ char** err_matches;
+ const char* err_string ;
int i ;
+ int ret ;
int cnt;
+ char die_msg[1024] ;
+ char tmp_msg[128];
PPCODE:
cnt = aug_match(aug, pattern, &matches);
if (cnt == -1) {
- return ;
+ sprintf(die_msg, "aug_match error with pattern '%s':\n",pattern);
+ cnt = aug_match(aug,"/augeas//error/descendant-or-self::*",&err_matches);
+ for (i=0; i < cnt; i++) {
+ ret = aug_get(aug, err_matches[i], &err_string) ;
+ sprintf(tmp_msg,"%s = %s\n", err_matches[i], err_string );
+ if (strlen(die_msg) + strlen(tmp_msg) < 1024 )
+ strcat(die_msg,tmp_msg);
+ }
+ croak (die_msg);
}
// printf("match: Pattern %s matches %d times\n", pattern, cnt);
Modified: trunk/libconfig-augeas-perl/t/Config-AugeasC.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-augeas-perl/t/Config-AugeasC.t?rev=30798&op=diff
==============================================================================
--- trunk/libconfig-augeas-perl/t/Config-AugeasC.t (original)
+++ trunk/libconfig-augeas-perl/t/Config-AugeasC.t Wed Feb 18 12:08:23 2009
@@ -137,10 +137,10 @@
# get return value directly from Augeas
is($ret ,0,"mv ok");
-my @a = $augc->match("/files/etc/hosts/") ;
+my @a = $augc->match("/files/etc/hosts") ;
is_deeply(\@a,["/files/etc/hosts"],"match result") ;
-$ret = $augc->count_match("/files/etc/hosts/") ;
+$ret = $augc->count_match("/files/etc/hosts") ;
is($ret,1,"count_match result") ;
$ret = $augc->save ;
More information about the Pkg-perl-cvs-commits
mailing list