Package: libconfig-augeas-perl
Version: 0.902-1
Severity: important
Tags: patch
User: [email protected]
Usertags: origin-ubuntu precise ubuntu-patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
*** /tmp/tmpJbaQ_x/bug_body
In Ubuntu, the attached patch was applied to achieve the following:
* d/p/version-parse.patch: (LP: #935221) Use version->parse to compare
installed augeas version to required minimum.
Without the patch applied, the version check doesn't recognize 0.10.0 as
greater than the required 0.9.0 version, as seen in the buildlog here:
https://launchpadlibrarian.net/87294645/buildlog_ubuntu-precise-i386.libconfig-augeas-perl_0.902-1_BUILDING.txt.gz
dh build
dh_testdir
dh_auto_configure
***
*** 'pkg-config' did find augeas version 0.10.0 but
*** version 0.9.0 minimum is required
***
dh_auto_build
dh_auto_test
This causes the package to be empty.
Note that this isn't a problem in Debian yet, which hasn't updated to augeas
0.10.0.
See this snippet:
andreas@anubis:~/t$ cat test.pl
use version;
$version1 = "0.9.0";
$version2 = "0.10.0";
print "Using version->parse\n";
if (version->parse($version1) > version->parse($version2))
{
print "$version1 is greater than $version2\n";
}
else
{
print "$version1 is less than $version2\n";
}
print "Using >\n";
if ($version1 gt $version2)
{
print "$version1 is greater than $version2\n";
}
else
{
print "$version1 is less than $version2\n";
}
andreas@anubis:~/t$ perl test.pl
Using version->parse
0.9.0 is less than 0.10.0
Using gt
0.9.0 is greater than 0.10.0
andreas@anubis:~/t$
See also https://bugs.launchpad.net/bugs/935221
Thanks for considering the patch.
Cheers,
Andreas
- -- System Information:
Debian Release: wheezy/sid
APT prefers precise
APT policy: (800, 'precise')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-17-generic (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAEBAgAGBQJPVmxlAAoJEGHzRCZ03mYkGngQAJnFcD9rxOqLloVdyxONuY7p
0ADdtzFVUFzCdKFT5D6nKm67vSlQrbO/M1ERU3kxSwrwsrDa3q6Mw5+aW+191quh
AVmR+g2bqKfl9VlfIj7d2ZhjE6oFkkimymSV6zaS56B5Uz5JLO2G7b9kvOGLZEnX
l8DtSSowbjwcSsIOViITyZ15gP6RJ2j81jcybYXJhtL5w7EUONb9FjYhOEMyydHX
KWXkAh4/Ob1FoCah6EDsifOCJQtIfD+HxYFOtk4r0oiUeQfOkXoyBFAIlLodbxBR
IHp62ElJ1rxuu6DgcFl+p5k8j2fkOI7q8Cg5rD5JoyLjELZO5Lwm8RIxyky5UbGa
XpYqC6EL1onSMPQBbM5UP+faoefBqPEO2OvacvRC/XMkiR9XJsTSYWPtlf4gSfot
+b/16akx6ctOGOfWKUduq/UOtUcnkTCPK5xDTamJR8BldH2zmxa62Xo1uW4gYzgY
fIfUb3KIs2J+BclTLBfEdhPsE3UNUKsRdiYYTlMnyBmbfbAC1b/pGD6xhceZ1nJY
QCgNXwth4b4+0mxx6lWH/5oG6hxM1xYElhg7ZHQH8Hp80UzzJTHO98/0+G30AYSw
fsro0OnfrPs/PncnpY/OT96Hx2/6KOirjcopv3O31yl91Iq6H2Dgb3IfV7kr0pLq
8+woCirZtssu2GuGol+z
=+OY2
-----END PGP SIGNATURE-----
diff -Nru libconfig-augeas-perl-0.902/debian/patches/series libconfig-augeas-perl-0.902/debian/patches/series
--- libconfig-augeas-perl-0.902/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ libconfig-augeas-perl-0.902/debian/patches/series 2012-03-06 20:44:42.000000000 +0100
@@ -0,0 +1 @@
+version_compare.patch
diff -Nru libconfig-augeas-perl-0.902/debian/patches/version_compare.patch libconfig-augeas-perl-0.902/debian/patches/version_compare.patch
--- libconfig-augeas-perl-0.902/debian/patches/version_compare.patch 1970-01-01 01:00:00.000000000 +0100
+++ libconfig-augeas-perl-0.902/debian/patches/version_compare.patch 2012-03-06 20:45:23.000000000 +0100
@@ -0,0 +1,26 @@
+Description: Use version->parse to compare installed augeas version to required minimum.
+Author: Andreas Moog <[email protected]>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/935221
+
+Index: libconfig-augeas-perl-0.902/Build.PL
+===================================================================
+--- libconfig-augeas-perl-0.902.orig/Build.PL 2012-03-06 20:44:42.000000000 +0100
++++ libconfig-augeas-perl-0.902/Build.PL 2012-03-06 20:45:21.546588115 +0100
+@@ -18,6 +18,8 @@
+
+ use Module::Build;
+
++use version;
++
+ use warnings FATAL => qw(all) ;
+ use strict ;
+
+@@ -57,7 +59,7 @@
+
+ my $min_version = '0.9.0' ;
+
+-if ( not defined $aug_version or ( $aug_version lt $min_version)) {
++if ( not defined $aug_version or ( version->parse($aug_version) lt version->parse($min_version))) {
+ warn << "EOW2" ;
+ ***
+ *** 'pkg-config' did find augeas version $aug_version but