Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/distro.py
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-11-15 00:18:00 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-11-15 00:18:00 (GMT)
commite9547167d9fe1c64279d2b0d9964961af6480b46 (patch)
treee46e3c6441c4c3b72d2bb969322a648849a6ea96 /devbot/distro.py
parent5f4bae983a172b91e00ce1572f750abffabd1fc6 (diff)
Make yum non interactive if running under buildbot
Diffstat (limited to 'devbot/distro.py')
-rw-r--r--devbot/distro.py17
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} ]"