diff options
author | Paride Legovini <paride.legovini@canonical.com> | 2020-10-19 22:59:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-19 14:59:16 -0600 |
commit | 5a7f6818083118b45828fa0b334309449881f80a (patch) | |
tree | d0a0ca04fd8cfc2aebc5ca667f854619c7452429 /cloudinit | |
parent | b94962b558e929a365bcfad1ca9a9445eee575e8 (diff) | |
download | vyos-cloud-init-5a7f6818083118b45828fa0b334309449881f80a.tar.gz vyos-cloud-init-5a7f6818083118b45828fa0b334309449881f80a.zip |
bddeb: new --packaging-branch argument to pull packaging from branch (#576)
bddeb builds a .deb package using the template packaging files in
packages/debian/.
The new --packaging-branch flag allows to specify a git branch
where to pull the packaging (i.e. the debian/ directory) from.
This is useful to build a .deb package from master with the very
same packaging which is used for the uploads.
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/subp.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cloudinit/subp.py b/cloudinit/subp.py index 3e4efa42..024e1a98 100644 --- a/cloudinit/subp.py +++ b/cloudinit/subp.py @@ -144,7 +144,7 @@ class ProcessExecutionError(IOError): def subp(args, data=None, rcs=None, env=None, capture=True, combine_capture=False, shell=False, logstring=False, decode="replace", target=None, update_env=None, - status_cb=None): + status_cb=None, cwd=None): """Run a subprocess. :param args: command to run in a list. [cmd, arg1, arg2...] @@ -181,6 +181,8 @@ def subp(args, data=None, rcs=None, env=None, capture=True, :param status_cb: call this fuction with a single string argument before starting and after finishing. + :param cwd: + change the working directory to cwd before executing the command. :return if not capturing, return is (None, None) @@ -254,7 +256,7 @@ def subp(args, data=None, rcs=None, env=None, capture=True, try: sp = subprocess.Popen(bytes_args, stdout=stdout, stderr=stderr, stdin=stdin, - env=env, shell=shell) + env=env, shell=shell, cwd=cwd) (out, err) = sp.communicate(data) except OSError as e: if status_cb: |