Merge pull request #46572 from dmurphy18/update_xxxbuild

Addition of -sa flag to allow for revision numbers other than -0 or -1
This commit is contained in:
Gareth J. Greenaway 2018-03-19 13:07:25 -07:00 committed by GitHub
commit 31c78aef11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -420,6 +420,9 @@ def build(runas,
# use default /var/cache/pbuilder/result
results_dir = '/var/cache/pbuilder/result'
## ensure clean
__salt__['cmd.run']('rm -fR {0}'.format(results_dir))
# dscs should only contain salt orig and debian tarballs and dsc file
for dsc in dscs:
afile = os.path.basename(dsc)
@ -430,10 +433,10 @@ def build(runas,
try:
__salt__['cmd.run']('chown {0} -R {1}'.format(runas, dbase))
cmd = 'pbuilder --update --override-config'
cmd = 'pbuilder update --override-config'
__salt__['cmd.run'](cmd, runas=runas, python_shell=True)
cmd = 'pbuilder --build {0}'.format(dsc)
cmd = 'pbuilder build --debbuildopts "-sa" {0}'.format(dsc)
__salt__['cmd.run'](cmd, runas=runas, python_shell=True)
# ignore local deps generated package file