comparison tests/hghave.py @ 34394:dbf83230e8be

hghave: fix dpkg --version check to work on recent dpkg versions Differential Revision: https://phab.mercurial-scm.org/D869
author Kyle Lippincott <spectral@google.com>
date Sun, 01 Oct 2017 03:48:28 -0700
parents 4d1e79945c2e
children 200eadbcf0b0
comparison
equal deleted inserted replaced
34393:fffd3369aa83 34394:dbf83230e8be
571 return True 571 return True
572 return False 572 return False
573 573
574 @check("debhelper", "debian packaging tools") 574 @check("debhelper", "debian packaging tools")
575 def has_debhelper(): 575 def has_debhelper():
576 # Some versions of dpkg say `dpkg', some say 'dpkg' (` vs ' on the first
577 # quote), so just accept anything in that spot.
576 dpkg = matchoutput('dpkg --version', 578 dpkg = matchoutput('dpkg --version',
577 br"Debian `dpkg' package management program") 579 br"Debian .dpkg' package management program")
578 dh = matchoutput('dh --help', 580 dh = matchoutput('dh --help',
579 br'dh is a part of debhelper.', ignorestatus=True) 581 br'dh is a part of debhelper.', ignorestatus=True)
580 dh_py2 = matchoutput('dh_python2 --help', 582 dh_py2 = matchoutput('dh_python2 --help',
581 br'other supported Python versions') 583 br'other supported Python versions')
582 return dpkg and dh and dh_py2 584 return dpkg and dh and dh_py2