From: Michał Górny Date: Tue, 3 Oct 2017 18:26:47 +0000 (+0200) Subject: sys-apps/sandbox: Fix REPLACING_VERSIONS use X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=0e75df216fd02d70c32ce8cac8b52690f879566f;p=gentoo.git sys-apps/sandbox: Fix REPLACING_VERSIONS use Closes: https://bugs.gentoo.org/589518 --- 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 }