From 0bd22ff7bfd9b26e4acd085a6735e8a9cddcd475 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Mon, 11 Nov 2019 16:12:18 +0100 Subject: [PATCH] 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 --- teuthology/task/install/rpm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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): """ -- 2.39.5