[devscripts] 01/02: debchange.pl: Replace dpkg call with Dpkg::Version::compare_version

James McCoy jamessan at debian.org
Thu Jun 22 03:19:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch master
in repository devscripts.

commit a99950b0fe7d4fef7b642740970bc409d3968f51
Author: Hilko Bengen <bengen at debian.org>
Date:   Fri Feb 3 18:19:16 2017 +0100

    debchange.pl: Replace dpkg call with Dpkg::Version::compare_version
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog     | 4 ++++
 scripts/debchange.pl | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 788089e..90989e9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,10 @@ devscripts (2.17.7) UNRELEASED; urgency=medium
   * debchange:
     + Target stretch-backports with --bpo.
 
+  [ Hilko Bengen ]
+  * debchange:
+    + Replace dpkg call with Dpkg::Version::compare_version  (Closes: #854366)
+
  -- Paul Wise <pabs at debian.org>  Sat, 17 Jun 2017 13:11:35 +0800
 
 devscripts (2.17.6) unstable; urgency=medium
diff --git a/scripts/debchange.pl b/scripts/debchange.pl
index c63c742..a5346fe 100755
--- a/scripts/debchange.pl
+++ b/scripts/debchange.pl
@@ -1071,8 +1071,7 @@ if (($opt_i || $opt_n || $opt_bn || $opt_qa || $opt_R || $opt_s || $opt_team ||
 	    $opt_p=1;
 	}
 
-	if (system("dpkg --compare-versions $VERSION le $NEW_VERSION" .
-		  " 2>/dev/null 1>&2")) {
+	if (version_compare($VERSION, $NEW_VERSION) == 1) {
 	    if ($opt_b or ($opt_allow_lower and $NEW_VERSION =~ /$opt_allow_lower/)) {
 		warn "$progname warning: new version ($NEW_VERSION) is less than\n" .
 		    "the current version number ($VERSION).\n";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list