From 963ed8ed8014f763441ee4be5033c6a312e262f0 Mon Sep 17 00:00:00 2001 From: John Allen Date: Thu, 25 Jul 2019 10:15:51 -0500 Subject: [PATCH] lkp-exec/install: Return success if package already installed When build_install_benchmarks encounters a pacakge that is already installed, pack returns 0 and subsequently hits the [ -f $deb_pkg ] || return check. In this case, we want to return success and continue with the installation. However, since a return with no integer parameter will simply return the result of the last statement, this returns false. Modify the return to explicitly return 0. Signed-off-by: John Allen --- lkp-exec/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lkp-exec/install b/lkp-exec/install index c64242bfe..01c3317b6 100755 --- a/lkp-exec/install +++ b/lkp-exec/install @@ -217,7 +217,7 @@ build_install_benchmarks() { case $distro in debian|ubuntu) local deb_pkg=/tmp/$pkg_name.deb - [ -f $deb_pkg ] || return + [ -f $deb_pkg ] || return 0 dpkg -i $deb_pkg 2>/tmp/dpkg_error || { grep -v "dpkg: warning: files list file for package '.*' missing;" /tmp/dpkg_error return 1 @@ -225,7 +225,7 @@ build_install_benchmarks() { ;; fedora) local rpm_pkg=$BUILD_DIR/$pkg_name/RPMS/$pkg_name.$(uname -m).rpm - [ -f $rpm_pkg ] || return + [ -f $rpm_pkg ] || return 0 rpm -ivh --replacepkgs $rpm_pkg ;; *) echo "Just make /lkp/benchmarks/$script-$(uname -m).cgz" ;;