From 0e75df216fd02d70c32ce8cac8b52690f879566f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 3 Oct 2017 20:26:47 +0200 Subject: [PATCH] sys-apps/sandbox: Fix REPLACING_VERSIONS use Closes: https://bugs.gentoo.org/589518 --- sys-apps/sandbox/sandbox-2.12.ebuild | 24 +++++++++++++++--------- 1 file 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 } -- 2.26.2