Patchwork [1,of,4,debhelper] hghave: correct test for debhelper

login
register
mail settings
Submitter Augie Fackler
Date Sept. 1, 2015, 4:11 a.m.
Message ID <ce4b4c2f37b7c845d7ec.1441080669@imladris.local>
Download mbox | patch
Permalink /patch/10335/
State Accepted
Headers show

Comments

Augie Fackler - Sept. 1, 2015, 4:11 a.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1441075413 14400
#      Mon Aug 31 22:43:33 2015 -0400
# Node ID ce4b4c2f37b7c845d7ec3e7c8e8ca0898ad8104e
# Parent  049005de325ea400893f45bd6221215cc9b26db0
hghave: correct test for debhelper

debhelper exits with a nonzero status when you pass --help, at least
on jessie.

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -436,7 +436,7 @@  def has_debhelper():
     dpkg = matchoutput('dpkg --version',
                        "Debian `dpkg' package management program")
     dh = matchoutput('dh --help',
-                     'dh is a part of debhelper.')
+                     'dh is a part of debhelper.', ignorestatus=True)
     dh_py2 = matchoutput('dh_python2 --help',
                          'other supported Python versions')
     return dpkg and dh and dh_py2