From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 6/7] systemd.eclass: Allow systemd_update_catalog only during pkg_post*
Date: Fri, 27 Nov 2015 15:53:27 +0100 [thread overview]
Message-ID: <1448636008-13184-7-git-send-email-mgorny@gentoo.org> (raw)
In-Reply-To: <1448636008-13184-1-git-send-email-mgorny@gentoo.org>
---
eclass/systemd.eclass | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass
index a9ec26d..47ceffe 100644
--- a/eclass/systemd.eclass
+++ b/eclass/systemd.eclass
@@ -344,7 +344,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.
@@ -353,6 +353,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
next prev parent reply other threads:[~2015-11-27 14:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 14:53 [gentoo-dev] [PATCHES] systemd.eclass: Clean up & EAPI 6 support Michał Górny
2015-11-27 14:53 ` [gentoo-dev] [PATCH 1/7] systemd.eclass: Introduce a common getter for systemd directories Michał Górny
2015-11-27 14:53 ` [gentoo-dev] [PATCH 2/7] systemd.eclass: Update the example for best practices Michał Górny
2015-11-27 14:53 ` [gentoo-dev] [PATCH 3/7] systemd.eclass: Remove long-deprecated systemd_to_myeconfargs Michał Górny
2015-11-27 14:53 ` [gentoo-dev] [PATCH 4/7] systemd.eclass: Add missing ||die on ntp file writes Michał Górny
2015-11-27 14:53 ` [gentoo-dev] [PATCH 5/7] systemd.eclass: Ban systemd_with_* in EAPI 6 Michał Górny
2015-11-27 14:53 ` Michał Górny [this message]
2015-11-27 14:53 ` [gentoo-dev] [PATCH 7/7] systemd.eclass: Enable EAPI=6 Michał Górny
2015-11-30 15:01 ` [gentoo-dev] [v2] systemd.eclass cleanup & EAPI 6 support Michał Górny
2015-11-30 15:01 ` [gentoo-dev] [PATCH 1/8] systemd.eclass: Introduce a common getter for systemd directories Michał Górny
2015-11-30 15:01 ` [gentoo-dev] [PATCH 2/8] systemd.eclass: systemd_get_unitdir -> *systemunitdir for consistency Michał Górny
2015-11-30 15:01 ` [gentoo-dev] [PATCH 3/8] systemd.eclass: Update the example for best practices Michał Górny
2015-11-30 15:01 ` [gentoo-dev] [PATCH 4/8] systemd.eclass: Remove long-deprecated systemd_to_myeconfargs Michał Górny
2015-11-30 15:01 ` [gentoo-dev] [PATCH 5/8] systemd.eclass: Add missing ||die on ntp file writes Michał Górny
2015-11-30 15:01 ` [gentoo-dev] [PATCH 6/8] systemd.eclass: Ban systemd_with_* in EAPI 6 Michał Górny
2015-11-30 15:01 ` [gentoo-dev] [PATCH 7/8] systemd.eclass: Allow systemd_update_catalog only during pkg_post* Michał Górny
2015-11-30 15:01 ` [gentoo-dev] [PATCH 8/8] systemd.eclass: Enable EAPI=6 Michał Górny
2015-12-01 22:08 ` [gentoo-dev] [v2] systemd.eclass cleanup & EAPI 6 support Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448636008-13184-7-git-send-email-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox