1 |
--- |
2 |
eclass/systemd.eclass | 5 ++++- |
3 |
1 file changed, 4 insertions(+), 1 deletion(-) |
4 |
|
5 |
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass |
6 |
index a9ec26d..47ceffe 100644 |
7 |
--- a/eclass/systemd.eclass |
8 |
+++ b/eclass/systemd.eclass |
9 |
@@ -344,7 +344,7 @@ systemd_with_utildir() { |
10 |
# @FUNCTION: systemd_update_catalog |
11 |
# @DESCRIPTION: |
12 |
# Update the journald catalog. This needs to be called after installing |
13 |
-# or removing catalog files. |
14 |
+# or removing catalog files. This must be called in pkg_post* phases. |
15 |
# |
16 |
# If systemd is not installed, no operation will be done. The catalog |
17 |
# will be (re)built once systemd is installed. |
18 |
@@ -353,6 +353,9 @@ systemd_with_utildir() { |
19 |
systemd_update_catalog() { |
20 |
debug-print-function ${FUNCNAME} "${@}" |
21 |
|
22 |
+ [[ ${EBUILD_PHASE} == post* ]] \ |
23 |
+ || die "${FUNCNAME} disallowed during ${EBUILD_PHASE_FUNC:-${EBUILD_PHASE}}" |
24 |
+ |
25 |
# Make sure to work on the correct system. |
26 |
|
27 |
local journalctl=${EPREFIX}/usr/bin/journalctl |
28 |
-- |
29 |
2.6.3 |