commit:     0ae76143a26660f4b4a2b94fe7ab6c2f305aaf48
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 12 16:40:29 2016 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Mar 12 17:36:19 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ae76143

app-portage/gentoolkit: Create /var/cache/revdep-rebuild in pkg_postinst

This resolves a QA warning.

QA Notice: This ebuild installs into paths that should be created at runtime.
 To fix, simply do not install into these directories.  Instead, your package
 should create dirs on the fly at runtime as needed via init scripts/etc...

  var/cache
  var/cache/revdep-rebuild
  var/cache/revdep-rebuild/.keep_app-portage_gentoolkit-0

We already install a tmpfiles entry to recreate the directory on boot.

Package-Manager: portage-2.2.28_p57

 .../{gentoolkit-0.3.1.ebuild => gentoolkit-0.3.1-r1.ebuild}   | 11 +++++------
 app-portage/gentoolkit/gentoolkit-9999.ebuild                 | 11 +++++------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/app-portage/gentoolkit/gentoolkit-0.3.1.ebuild 
b/app-portage/gentoolkit/gentoolkit-0.3.1-r1.ebuild
similarity index 93%
rename from app-portage/gentoolkit/gentoolkit-0.3.1.ebuild
rename to app-portage/gentoolkit/gentoolkit-0.3.1-r1.ebuild
index 7621d42..55d3f21 100644
--- a/app-portage/gentoolkit/gentoolkit-0.3.1.ebuild
+++ b/app-portage/gentoolkit/gentoolkit-0.3.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -38,11 +38,6 @@ python_prepare_all() {
 python_install_all() {
        distutils-r1_python_install_all
 
-       # Create cache directory for revdep-rebuild
-       keepdir /var/cache/revdep-rebuild
-       use prefix || fowners root:0 /var/cache/revdep-rebuild
-       fperms 0700 /var/cache/revdep-rebuild
-
        # remove on Gentoo Prefix platforms where it's broken anyway
        if use prefix; then
                elog "The revdep-rebuild command is removed, the preserve-libs"
@@ -55,6 +50,10 @@ python_install_all() {
 }
 
 pkg_postinst() {
+       # Create cache directory for revdep-rebuild
+       mkdir -p -m 0755 "${EROOT%/}"/var/cache
+       mkdir -p -m 0700 "${EROOT%/}"/var/cache/revdep-rebuild
+
        # Only show the elog information on a new install
        if [[ ! ${REPLACING_VERSIONS} ]]; then
                elog

diff --git a/app-portage/gentoolkit/gentoolkit-9999.ebuild 
b/app-portage/gentoolkit/gentoolkit-9999.ebuild
index bba13e5..436c76f 100644
--- a/app-portage/gentoolkit/gentoolkit-9999.ebuild
+++ b/app-portage/gentoolkit/gentoolkit-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -39,11 +39,6 @@ python_prepare_all() {
 python_install_all() {
        distutils-r1_python_install_all
 
-       # Create cache directory for revdep-rebuild
-       keepdir /var/cache/revdep-rebuild
-       use prefix || fowners root:0 /var/cache/revdep-rebuild
-       fperms 0700 /var/cache/revdep-rebuild
-
        # remove on Gentoo Prefix platforms where it's broken anyway
        if use prefix; then
                elog "The revdep-rebuild command is removed, the preserve-libs"
@@ -56,6 +51,10 @@ python_install_all() {
 }
 
 pkg_postinst() {
+       # Create cache directory for revdep-rebuild
+       mkdir -p -m 0755 "${EROOT%/}"/var/cache
+       mkdir -p -m 0700 "${EROOT%/}"/var/cache/revdep-rebuild
+
        # Only show the elog information on a new install
        if [[ ! ${REPLACING_VERSIONS} ]]; then
                elog

Reply via email to