From e9547167d9fe1c64279d2b0d9964961af6480b46 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Thu, 15 Nov 2012 00:18:00 +0000 Subject: Make yum non interactive if running under buildbot --- (limited to 'devbot/distro.py') 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} ]" -- cgit v0.9.1