Patchwork [3,of,6] hghave: add a check for debian packaging tools

login
register
mail settings
Submitter Augie Fackler
Date Aug. 27, 2015, 11:26 p.m.
Message ID <607d6ea0269a536a47ef.1440718015@imladris.local>
Download mbox | patch
Permalink /patch/10307/
State Accepted
Headers show

Comments

Augie Fackler - Aug. 27, 2015, 11:26 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1440475395 14400
#      Tue Aug 25 00:03:15 2015 -0400
# Node ID 607d6ea0269a536a47ef1fddc3b54aa5dacaf313
# Parent  70a90bb7d98eb587dc69818ae0e421f2dc70be17
hghave: add a check for debian packaging tools

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -414,6 +414,16 @@  def has_aix():
 def has_osx():
     return sys.platform == 'darwin'
 
+@check("debhelper", "debian packaging tools")
+def has_debhelper():
+    dpkg = matchoutput('dpkg --version',
+                       "Debian `dpkg' package management program")
+    dh = matchoutput('dh --help',
+                     'dh is a part of debhelper.')
+    dh_py2 = matchoutput('dh_python2 --help',
+                         'other supported Python versions')
+    return dpkg and dh and dh_py2
+
 @check("absimport", "absolute_import in __future__")
 def has_absimport():
     import __future__