diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-10-03 20:26:47 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2017-10-03 21:09:26 +0200 |
commit | 0e75df216fd02d70c32ce8cac8b52690f879566f (patch) | |
tree | 98682afc3c01933eeeeff2929e8585c5fff1ac73 /sys-apps/sandbox | |
parent | sys-apps/sandbox: Bump to 2.12 (diff) | |
download | gentoo-0e75df216fd02d70c32ce8cac8b52690f879566f.tar.gz gentoo-0e75df216fd02d70c32ce8cac8b52690f879566f.tar.bz2 gentoo-0e75df216fd02d70c32ce8cac8b52690f879566f.zip |
sys-apps/sandbox: Fix REPLACING_VERSIONS use
Closes: https://bugs.gentoo.org/589518
Diffstat (limited to 'sys-apps/sandbox')
-rw-r--r-- | sys-apps/sandbox/sandbox-2.12.ebuild | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/sys-apps/sandbox/sandbox-2.12.ebuild b/sys-apps/sandbox/sandbox-2.12.ebuild index 77ad8b92e125..6bea9b719117 100644 --- a/sys-apps/sandbox/sandbox-2.12.ebuild +++ b/sys-apps/sandbox/sandbox-2.12.ebuild @@ -54,17 +54,23 @@ pkg_preinst() { chown root:portage "${ED}"/var/log/sandbox chmod 0770 "${ED}"/var/log/sandbox - if [[ ${REPLACING_VERSIONS} == 1.* ]] ; then - local old=$(find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*') - if [[ -n ${old} ]] ; then - elog "Removing old sandbox libraries for you:" - find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -print -delete + local v + for v in ${REPLACING_VERSIONS}; do + if [[ ${v} == 1.* ]] ; then + local old=$(find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*') + if [[ -n ${old} ]] ; then + elog "Removing old sandbox libraries for you:" + find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -print -delete + fi fi - fi + done } pkg_postinst() { - if [[ ${REPLACING_VERSIONS} == 1.* ]] ; then - chmod 0755 "${EROOT}"/etc/sandbox.d #265376 - fi + local v + for v in ${REPLACING_VERSIONS}; do + if [[ ${v} == 1.* ]] ; then + chmod 0755 "${EROOT}"/etc/sandbox.d #265376 + fi + done } |