Skip to content

Commit

Permalink
app-portage/gentoolkit: Create /var/cache/revdep-rebuild in pkg_postinst
Browse files Browse the repository at this point in the history
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
  • Loading branch information
floppym committed Mar 12, 2016
1 parent 34d6e3a commit 0ae7614
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -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$

Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand Down
11 changes: 5 additions & 6 deletions app-portage/gentoolkit/gentoolkit-9999.ebuild
Original file line number Diff line number Diff line change
@@ -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$

Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 0ae7614

Please sign in to comment.