From 8e39bd5d9682d2e7259d9bb5944ecbe1b8a4500d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Tue, 26 May 2020 18:50:52 +0100 Subject: subr/pkg_install{,_files}.subr: call pkgp_install{,_files}_perms() as early as possible. --- subr/pkg_install.subr | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'subr/pkg_install.subr') diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr index a3784992..b965a9ad 100644 --- a/subr/pkg_install.subr +++ b/subr/pkg_install.subr @@ -2,26 +2,6 @@ # set +o errexit -o noglob -o nounset is assumed. # -pkgp_install_perms() { - local _destdir="${1}" _fname="" IFS; - rtl_set_IFS_nl; - for _fname in $(find "${_destdir}" -type d); do - if ! rtl_fileop chmod 0755 "${_fname}"; then - return 1; - fi; - done; - for _fname in $(find "${_destdir}" \( -not -perm /0111 \) -type f); do - if ! rtl_fileop chmod 0644 "${_fname}"; then - return 1; - fi; - done; - for _fname in $(find "${_destdir}" -perm /0111 -type f); do - if ! rtl_fileop chmod 0755 "${_fname}"; then - return 1; - fi; - done; -}; - pkg_install() { local _destdir="" _destdir_prefix="" _pkglist_name=""; if ! rtl_fileop mkdir "${PKG_PREFIX}"; then @@ -29,7 +9,6 @@ pkg_install() { else for _destdir in "${PKG_DESTDIR}:${PKG_PREFIX}" "${PKG_DESTDIR_HOST}:${PREFIX}"; do rtl_lassign "_destdir _destdir_prefix" ":" "${_destdir}"; if [ -e "${_destdir}" ]; then - pkgp_install_perms "${_destdir}"; (set +o errexit -o noglob; rtl_flock_acquire 4 || exit "${?}"; date; trap "rm -f \"${BUILD_WORKDIR}/install.lock\"" EXIT; if ! tar -C "${_destdir}" -cpf - . | tar -C "${_destdir_prefix}" --overwrite -xpf -; then -- cgit v1.2.3