From: Kyr Shatskyy Date: Mon, 11 Nov 2019 15:12:18 +0000 (+0100) Subject: install/rpm: fix use the 'zypper addrepo' command X-Git-Tag: 1.1.0~204^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0bd22ff7bfd9b26e4acd085a6735e8a9cddcd475;p=teuthology.git install/rpm: fix use the 'zypper addrepo' command The 74034fe0348b94aedb247910f0d1c88842f4c3ac instroduced a failure: Warning: No repositories defined. Use the 'zypper addrepo' command to add one or more repositories. The wipe command returns exit code 6 if there is no repos in the system. Signed-off-by: Kyr Shatskyy --- diff --git a/teuthology/task/install/rpm.py b/teuthology/task/install/rpm.py index 437941339a..fc579a6109 100644 --- a/teuthology/task/install/rpm.py +++ b/teuthology/task/install/rpm.py @@ -104,7 +104,9 @@ def _zypper_wipe_all_repos(remote): :return: """ log.info("Wiping zypper repos (if any)") - remote.sh('sudo zypper repos -upEP && sudo rm -f /etc/zypp/repos.d/*') + remote.sh('sudo zypper repos -upEP && ' + 'sudo rm -f /etc/zypp/repos.d/* || ' + 'true') def _downgrade_packages(ctx, remote, pkgs, pkg_version, config): """