diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-05-26 18:50:52 +0100 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-05-26 18:50:52 +0100 |
commit | 8e39bd5d9682d2e7259d9bb5944ecbe1b8a4500d (patch) | |
tree | 2ceef5d8135cc9a2f15f6434d5f332dfc2022786 /subr | |
parent | e7be9c882dc7a50221c667778169df58c87e8a2c (diff) | |
download | midipix_build-8e39bd5d9682d2e7259d9bb5944ecbe1b8a4500d.tar.bz2 midipix_build-8e39bd5d9682d2e7259d9bb5944ecbe1b8a4500d.tar.xz |
subr/pkg_install{,_files}.subr: call pkgp_install{,_files}_perms() as early as possible.
Diffstat (limited to 'subr')
-rw-r--r-- | subr/pkg_install.subr | 21 | ||||
-rw-r--r-- | subr/pkg_install_files.subr | 25 |
2 files changed, 25 insertions, 21 deletions
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 diff --git a/subr/pkg_install_files.subr b/subr/pkg_install_files.subr index 19c1a15b..7bfedb77 100644 --- a/subr/pkg_install_files.subr +++ b/subr/pkg_install_files.subr @@ -10,6 +10,30 @@ pkgp_install_files() { fi; }; +pkgp_install_files_perms() { + local _destdir="" _fname="" IFS; + for _destdir in "${PKG_DESTDIR}" "${PKG_DESTDIR_HOST}"; do + if [ -e "${_destdir}" ]; then + 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; + fi; + done; +}; + pkgp_install_files_pkgconfig() { local _pc_path=""; for _pc_path in $(find "${PKG_DESTDIR}" -name \*.pc); do @@ -44,6 +68,7 @@ pkgp_install_files_strip() { pkg_install_files() { if ! pkgp_install_files\ + || ! pkgp_install_files_perms\ || ! pkgp_install_files_pkgconfig\ || ! pkgp_install_files_strip; then return 1; |