Attached is a patch which fixes the dh_clideps behaviour, as well as
adds checking for b-d(-i) on cli-common-dev for versions greater than
0.4.4 (e.g. cli-common-dev (>= 0.5) also works).
-- 
Regards,
Chow Loong Jin
From 0eb16ea1c68ec7acafdab160131386d83e926d13 Mon Sep 17 00:00:00 2001
From: Chow Loong Jin <[email protected]>
Date: Wed, 22 Apr 2009 05:48:48 +0800
Subject: [PATCH] Fix cli-common-dev build-dep(-indep) detection logic

* dh_clideps:
  + Fix cli-common-dev build-dep(-indep) detection logic
---
 debian/changelog |    7 +++++++
 dh_clideps       |    7 ++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 515b33f..ba9f1ad 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+cli-common (0.6.3) UNRELEASED; urgency=low
+
+  * dh_clideps:
+    + Fix cli-common-dev build-dep(-indep) detection logic
+
+ -- Chow Loong Jin <[email protected]>  Wed, 22 Apr 2009 05:46:33 +0800
+
 cli-common (0.6.2) unstable; urgency=low
 
   * cli-nant.make
diff --git a/dh_clideps b/dh_clideps
index 296d218..edf9e70 100755
--- a/dh_clideps
+++ b/dh_clideps
@@ -156,10 +156,11 @@ if (defined($dh{INTERNAL_MONO_FLAG}) ||
 {
   local $/="";
   open(FILE, 'debian/control');
-  my @filedata = <FILE>;
+  my $srcblock = <FILE>;
   close(FILE);
-  if (!($filedata[0] =~ /Build-Depends(-Indep)?: .*cli-common-dev \(>= 0\.4\.4\)/)) {
-      warning("Warning! No Build-Depends(-Indep) on cli-common-dev (>= 0.4.4)!");
+  unless ($srcblock =~ m/Build-Depends(?:\-Indep)?\:[^:]*cli\-common\-dev\s*\(>=\s*([^\)]+)\)/
+          && system("dpkg", "--compare-versions", $1, ">=", "0.4.4") == 0) {
+    warning("Warning! No Build-Depends(-Indep) on cli-common-dev (>= 0.4.4)!");
   }
 }
 
-- 
1.5.6.3

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to