diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-11-15 00:18:00 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-11-15 00:18:00 (GMT) |
commit | e9547167d9fe1c64279d2b0d9964961af6480b46 (patch) | |
tree | e46e3c6441c4c3b72d2bb969322a648849a6ea96 /devbot/distro.py | |
parent | 5f4bae983a172b91e00ce1572f750abffabd1fc6 (diff) |
Make yum non interactive if running under buildbot
Diffstat (limited to 'devbot/distro.py')
-rw-r--r-- | devbot/distro.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/devbot/distro.py b/devbot/distro.py index 38210e5..1d44808 100644 --- a/devbot/distro.py +++ b/devbot/distro.py @@ -1,10 +1,16 @@ +import os import subprocess from devbot import command class FedoraPackageManager: def install_packages(self, packages): - args = ["yum", "install"] + args = ["yum"] + + if "SUGAR_BUILDBOT" in os.environ: + args.append("-y") + + args.append("install") args.extend(packages) command.run_with_sudo(args) @@ -16,7 +22,14 @@ class FedoraPackageManager: command.run_with_sudo(args) def update(self): - command.run_with_sudo(["yum", "update"]) + args = ["yum"] + + if "SUGAR_BUILDBOT" in os.environ: + args.append("-y") + + args.append("update") + + command.run_with_sudo(args) def find_all(self): query_format = "--queryformat=[%{NAME} ]" |