From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7F89A139084 for ; Thu, 15 Dec 2016 15:53:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B8244E0C29; Thu, 15 Dec 2016 15:53:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 924C6E0C29 for ; Thu, 15 Dec 2016 15:53:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 35F92340DD8 for ; Thu, 15 Dec 2016 15:53:30 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6CD7424B0 for ; Thu, 15 Dec 2016 15:53:28 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1481817204.d642644bfbd0ba605c561fefcbf6df58f30b6a84.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/man-db/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/man-db/man-db-2.7.6.1-r1.ebuild X-VCS-Directories: sys-apps/man-db/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: d642644bfbd0ba605c561fefcbf6df58f30b6a84 X-VCS-Branch: master Date: Thu, 15 Dec 2016 15:53:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f9c8d57a-b622-473c-9f2e-69c2d09ee5c7 X-Archives-Hash: 6e97ca7f6ee5729e70d3432ad01b1363 commit: d642644bfbd0ba605c561fefcbf6df58f30b6a84 Author: Mike Frysinger gentoo org> AuthorDate: Thu Dec 15 15:22:01 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Thu Dec 15 15:53:24 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d642644b sys-apps/man-db: move /var cache dir creation to runtime #520464 The rework in pkg_preinst is just about moving the path into a var. Otherwise, we just add some -d/mkdir testing logic to the end. sys-apps/man-db/man-db-2.7.6.1-r1.ebuild | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sys-apps/man-db/man-db-2.7.6.1-r1.ebuild b/sys-apps/man-db/man-db-2.7.6.1-r1.ebuild index 0f4cb33..035cc34 100644 --- a/sys-apps/man-db/man-db-2.7.6.1-r1.ebuild +++ b/sys-apps/man-db/man-db-2.7.6.1-r1.ebuild @@ -69,21 +69,21 @@ src_install() { exeinto /etc/cron.daily newexe "${FILESDIR}"/man-db.cron man-db #289884 - - keepdir /var/cache/man - fowners man:man /var/cache/man - fperms 0755 /var/cache/man } pkg_preinst() { - if [[ -f ${EROOT}var/cache/man/whatis ]] ; then - einfo "Cleaning ${EROOT}var/cache/man from sys-apps/man" - find "${EROOT}"var/cache/man -type f '!' '(' -name index.bt -o -name index.db ')' -delete + local cachedir="${EROOT}var/cache/man" + if [[ -f ${cachedir}/whatis ]] ; then + einfo "Cleaning ${cachedir} from sys-apps/man" + find "${cachedir}" -type f '!' '(' -name index.bt -o -name index.db ')' -delete fi - if [[ -g ${EROOT}var/cache/man ]] ; then - einfo "Resetting permissions on ${EROOT}var/cache/man" - chown -R man:man "${EROOT}"var/cache/man - find "${EROOT}"var/cache/man -type d -exec chmod g-s {} + + if [[ -g ${cachedir} ]] ; then + einfo "Resetting permissions on ${cachedir}" + chown -R man:man "${cachedir}" || die + find "${cachedir}" -type d -exec chmod g-s {} + || die + elif [[ ! -d ${cachedir} ]] ; then + mkdir -p "${cachedir}" || die + chown man:man "${cachedir}" || die fi }