This is to fix bug #449102 and potentially future bugs from packages
using journald (are there any?).
---
 gx86/eclass/systemd.eclass | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gx86/eclass/systemd.eclass b/gx86/eclass/systemd.eclass
index 63f6ed0..1c11535 100644
--- a/gx86/eclass/systemd.eclass
+++ b/gx86/eclass/systemd.eclass
@@ -184,3 +184,26 @@ systemd_to_myeconfargs() {
                --with-systemdsystemunitdir="$(systemd_get_unitdir)"
        )
 }
+
+# @FUNCTION: systemd_update_catalog
+# @DESCRIPTION:
+# Update the journald catalog. This needs to be called after installing
+# or removing catalog files.
+#
+# If systemd is not installed, no operation will be done. The catalog
+# will be (re)built once systemd is installed.
+#
+# See: http://www.freedesktop.org/wiki/Software/systemd/catalog
+systemd_update_catalog() {
+       debug-print-function ${FUNCNAME} "${@}"
+
+       # Make sure to work on the correct system.
+       local journalctl=${EPREFIX}/usr/bin/journalctl
+       if [[ -x ${journalctl} ]]; then
+               ebegin "Updating systemd journal catalogs"
+               journalctl --update-catalog
+               eend $?
+       else
+               debug-print "${FUNCNAME}: journalctl not found."
+       fi
+}
-- 
1.8.0.2


Reply via email to