Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 01 Dec 2015 22:07:44
Message-Id: 1449007637.45e18362449d6630cc3036b9595b39c73ee5b9fa.mgorny@gentoo
1 commit: 45e18362449d6630cc3036b9595b39c73ee5b9fa
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 27 14:44:48 2015 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 1 22:07:17 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45e18362
7
8 systemd.eclass: Allow systemd_update_catalog only during pkg_post*
9
10 eclass/systemd.eclass | 5 ++++-
11 1 file changed, 4 insertions(+), 1 deletion(-)
12
13 diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass
14 index c0c21a1..ae933aa 100644
15 --- a/eclass/systemd.eclass
16 +++ b/eclass/systemd.eclass
17 @@ -353,7 +353,7 @@ systemd_with_utildir() {
18 # @FUNCTION: systemd_update_catalog
19 # @DESCRIPTION:
20 # Update the journald catalog. This needs to be called after installing
21 -# or removing catalog files.
22 +# or removing catalog files. This must be called in pkg_post* phases.
23 #
24 # If systemd is not installed, no operation will be done. The catalog
25 # will be (re)built once systemd is installed.
26 @@ -362,6 +362,9 @@ systemd_with_utildir() {
27 systemd_update_catalog() {
28 debug-print-function ${FUNCNAME} "${@}"
29
30 + [[ ${EBUILD_PHASE} == post* ]] \
31 + || die "${FUNCNAME} disallowed during ${EBUILD_PHASE_FUNC:-${EBUILD_PHASE}}"
32 +
33 # Make sure to work on the correct system.
34
35 local journalctl=${EPREFIX}/usr/bin/journalctl