aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiao Yang <xiaox.yang@intel.com>2019-06-26 18:47:30 +0800
committerPhilip Li <philip.li@intel.com>2019-06-26 21:47:05 +0800
commit7e61523e3a33c003e1533522bc0e6415f803c824 (patch)
treee757d6e9560cf07e8e0826102d6a866f434a3871
parent8d6ac2b9adad464c7d77ecbcb51a78e6b106589c (diff)
downloadlkp-tests-7e61523e3a33c003e1533522bc0e6415f803c824.tar.gz
sbin/pacman-LKP: just do copy when "$INSTALL_DIR/usr" exists
fix the following error reproduced by running lkp install lmbench3 on clear linux: ------------------------------------------------------------------ cp: cannot stat '/root/lkp-tests/pkg/lmbench3/lmbench3-lkp/usr': No such file or directory ------------------------------------------------------------------ Signed-off-by: Xiao Yang <xiaox.yang@intel.com> Signed-off-by: Philip Li <philip.li@intel.com>
-rwxr-xr-xsbin/pacman-LKP5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/pacman-LKP b/sbin/pacman-LKP
index 15310178..7bfb5b3a 100755
--- a/sbin/pacman-LKP
+++ b/sbin/pacman-LKP
@@ -126,7 +126,10 @@ upgrade() {
pack_rpm "$pkg_name"
rpm -ivh --replacepkgs --force "$RPM_BUILD_DIR/RPMS/$pkg_name-LKP.rpm" || return 1 ;;
*)
- cp -r "$INSTALL_DIR/usr" / || return 1 ;;
+ if [ -e "$INSTALL_DIR/usr" ]; then
+ cp -r "$INSTALL_DIR/usr" / || return 1
+ fi
+ ;;
esac
echo "$pkg_name" >> "$DBFILE"