From affe2c3e71f87951302e48b0dd0789293cef4c53 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 3 Jul 2020 08:54:41 -0400 Subject: [PATCH] rpm_install: return 0 if package was already installed Currently, if the package was already installed, the script would return 2, or 6 or the package would be upgraded. It causes the script to fail (we use set -e); so to avoid that we added --replacepkgs --replacefiles and --oldpackage arguments to rpm. - Install the packages even if some of them are already installed on this system. - Install the packages even if they replace files from other, already installed, packages. - Allow an upgrade to replace a newer package with an older one. Change-Id: I8391e02456a304d4e29256cbbf5433879c6c42b1 --- files/rpm_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/rpm_install.sh b/files/rpm_install.sh index 003f85d..a7a6f9f 100755 --- a/files/rpm_install.sh +++ b/files/rpm_install.sh @@ -2,6 +2,6 @@ set -eox pipefail -rpm -Uvh /tmp/*.rpm +rpm --replacepkgs --replacefiles --oldpackage -Uvh /tmp/*.rpm rm -f /tmp/*.rpm rm -f /tmp/rpm_install.sh