xml-core: Makes packages to FTBFS with 'Unexpected debhelper version format'

gregor herrmann gregoa at debian.org
Mon Sep 26 13:00:47 UTC 2016


On Fri, 23 Sep 2016 12:29:57 +0200, Santiago Vila wrote:

> The regexp quoted by Sven is used in this way:
> 
> $1 > 9 or ($1 == 9 and $2 >= '20120909') or error('debhelper 9.20120909 or later required');
> 
> So what is really required here is to check that this is true:
> 
> $Debian::Debhelper::Dh_Version::version >= "9.20120909"
> 
> in the dpkg-version sense, but surely there is already a perl module
> to compare Debian version numbers "the right way"...

Idea 0 (which will probably happen anyway): change the debhelper
version back to x.y*

Idea 1: remove this whole check; debhelper >= 9.20120909 is already
satisfied in oldstable, so this doesn't serve any purpose any more.

Idea 2: For a real check, I'd probably try to start with checking out
Dpkg::Version in libdpkg-perl.

And since I was curious, I tried it out and it seems to work:

% perl -MDpkg::Version -E '$given=10; $required=Dpkg::Version->new("9.20120909"); say "satisfied" if $given >= $required;'
satisfied

Or:

% perl -MDpkg::Version -E '$given=10; $required="9.20120909"; say "satisfied" if version_compare($given, $required)>=0;'
satisfied

Or:

% perl -MDpkg::Version -E '$given=10; $required="9.20120909"; say "satisfied" if version_compare_relation($given, REL_GE, $required);'
satisfied


Cheers,
gregor

-- 
 .''`.  Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   BOFH excuse #61:  not approved by the FCC 



More information about the pkg-perl-maintainers mailing list