Patchwork D869: hghave: fix dpkg --version check to work on recent dpkg versions

login
register
mail settings
Submitter phabricator
Date Oct. 1, 2017, 11:04 a.m.
Message ID <c9a8a60be281f0ed70ac5c60855f1ed3@localhost.localdomain>
Download mbox | patch
Permalink /patch/24313/
State Not Applicable
Headers show

Comments

phabricator - Oct. 1, 2017, 11:04 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGdbf83230e8be: hghave: fix dpkg --version check to work on recent dpkg versions (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D869?vs=2239&id=2241

REVISION DETAIL
  https://phab.mercurial-scm.org/D869

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS




To: spectral, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -573,8 +573,10 @@ 
 
 @check("debhelper", "debian packaging tools")
 def has_debhelper():
+    # Some versions of dpkg say `dpkg', some say 'dpkg' (` vs ' on the first
+    # quote), so just accept anything in that spot.
     dpkg = matchoutput('dpkg --version',
-                       br"Debian `dpkg' package management program")
+                       br"Debian .dpkg' package management program")
     dh = matchoutput('dh --help',
                      br'dh is a part of debhelper.', ignorestatus=True)
     dh_py2 = matchoutput('dh_python2 --help',