From 90afa29f821b263e5070fdc30d7096519720d017 Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz Date: Sep 06 2017 14:32:03 +0000 Subject: subr/pkg_{install_pre,strip}.subr: always check for -e ${...}. --- diff --git a/subr/pkg_install_pre.subr b/subr/pkg_install_pre.subr index f2273ba..7ab8a9e 100644 --- a/subr/pkg_install_pre.subr +++ b/subr/pkg_install_pre.subr @@ -4,10 +4,12 @@ pkg_install_pre() { if [ "${PKG_NAME%flavour_minipix}" != "${PKG_NAME}" ] \ - && [ ${ARG_DEBUG_MINIPIX:-0} -eq 0 ]; then + && [ ${ARG_DEBUG_MINIPIX:-0} -eq 0 ] \ + && [ -e "${PREFIX_MINIPIX}" ]; then find "${PREFIX_MINIPIX}" -perm /a=x \ \( -type f -or -type l \) > "${WORKDIR}/.stat_minipix.old"; - elif [ "${BUILD}" = release ]; then + elif [ "${BUILD}" = release ] \ + && [ -e "${PREFIX_NATIVE}/bin" ]; then find "${PREFIX_NATIVE}/bin" -perm /a=x \ \( -type f -or -type l \) > "${WORKDIR}/.stat_native.old"; fi; diff --git a/subr/pkg_strip.subr b/subr/pkg_strip.subr index e0b2bf1..9f6ce31 100644 --- a/subr/pkg_strip.subr +++ b/subr/pkg_strip.subr @@ -5,7 +5,8 @@ pkgp_strip_tree() { local _tree_old="${1}" _tree_root="${2}"; local _tree_new="${_tree_old%.*}.new" _tree_diff="${_tree_old%.*}.diff"; - if [ ! -e "${_tree_old}" ]; then + if [ ! -e "${_tree_old}" ] \ + || [ ! -e "${_tree_root}" ]; then return; fi; find "${_tree_root}" -perm /a=x \( -type f -or -type l \) > "${_tree_new}";