From 0ae76143a26660f4b4a2b94fe7ab6c2f305aaf48 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Sat, 12 Mar 2016 11:40:29 -0500 Subject: [PATCH] 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 --- ...oolkit-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(-) rename app-portage/gentoolkit/{gentoolkit-0.3.1.ebuild => gentoolkit-0.3.1-r1.ebuild} (93%) 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 7621d423fa82..55d3f21ae4fc 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 bba13e510f8f..436c76f0c0b5 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 -- 2.26.2