Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot
diff options
context:
space:
mode:
Diffstat (limited to 'devbot')
-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} ]"