[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: [gentoo-dev] [PATCH 7/8] systemd.eclass: Allow systemd_update_catalog only during pkg_post*
From: Michał Górny <mgorny () gentoo ! org>
Date: 2015-11-30 15:01:21
Message-ID: 1448895682-19312-8-git-send-email-mgorny () gentoo ! org
[Download RAW message or body]
---
eclass/systemd.eclass | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass
index c0c21a1..ae933aa 100644
--- a/eclass/systemd.eclass
+++ b/eclass/systemd.eclass
@@ -353,7 +353,7 @@ systemd_with_utildir() {
# @FUNCTION: systemd_update_catalog
# @DESCRIPTION:
# Update the journald catalog. This needs to be called after installing
-# or removing catalog files.
+# or removing catalog files. This must be called in pkg_post* phases.
#
# If systemd is not installed, no operation will be done. The catalog
# will be (re)built once systemd is installed.
@@ -362,6 +362,9 @@ systemd_with_utildir() {
systemd_update_catalog() {
debug-print-function ${FUNCNAME} "${@}"
+ [[ ${EBUILD_PHASE} == post* ]] \
+ || die "${FUNCNAME} disallowed during ${EBUILD_PHASE_FUNC:-${EBUILD_PHASE}}"
+
# Make sure to work on the correct system.
local journalctl=${EPREFIX}/usr/bin/journalctl
--
2.6.3
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic