Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog systemd.eclass
Date: Mon, 31 Dec 2012 13:08:23
Message-Id: 20121231130812.A47952171D@flycatcher.gentoo.org
1 mgorny 12/12/31 13:08:12
2
3 Modified: ChangeLog systemd.eclass
4 Log:
5 Add function to update systemd journal catalog database.
6
7 Revision Changes Path
8 1.584 eclass/ChangeLog
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.584&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.584&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.583&r2=1.584
13
14 Index: ChangeLog
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
17 retrieving revision 1.583
18 retrieving revision 1.584
19 diff -u -r1.583 -r1.584
20 --- ChangeLog 31 Dec 2012 09:27:00 -0000 1.583
21 +++ ChangeLog 31 Dec 2012 13:08:12 -0000 1.584
22 @@ -1,6 +1,9 @@
23 # ChangeLog for eclass directory
24 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.583 2012/12/31 09:27:00 hd_brummy Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.584 2012/12/31 13:08:12 mgorny Exp $
27 +
28 + 31 Dec 2012; Michał Górny <mgorny@g.o> systemd.eclass:
29 + Add function to update systemd journal catalog database.
30
31 31 Dec 2012; Joerg Bornkessel <hd_brummy@g.o> vdr-plugin-2.eclass:
32 vdr-plugin-2.eclass; better detection of new Makefile handling, fixed some
33
34
35
36 1.20 eclass/systemd.eclass
37
38 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/systemd.eclass?rev=1.20&view=markup
39 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/systemd.eclass?rev=1.20&content-type=text/plain
40 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/systemd.eclass?r1=1.19&r2=1.20
41
42 Index: systemd.eclass
43 ===================================================================
44 RCS file: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v
45 retrieving revision 1.19
46 retrieving revision 1.20
47 diff -u -r1.19 -r1.20
48 --- systemd.eclass 21 Nov 2012 09:06:42 -0000 1.19
49 +++ systemd.eclass 31 Dec 2012 13:08:12 -0000 1.20
50 @@ -1,6 +1,6 @@
51 # Copyright 1999-2012 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 -# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.19 2012/11/21 09:06:42 mgorny Exp $
54 +# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.20 2012/12/31 13:08:12 mgorny Exp $
55
56 # @ECLASS: systemd.eclass
57 # @MAINTAINER:
58 @@ -184,3 +184,26 @@
59 --with-systemdsystemunitdir="$(systemd_get_unitdir)"
60 )
61 }
62 +
63 +# @FUNCTION: systemd_update_catalog
64 +# @DESCRIPTION:
65 +# Update the journald catalog. This needs to be called after installing
66 +# or removing catalog files.
67 +#
68 +# If systemd is not installed, no operation will be done. The catalog
69 +# will be (re)built once systemd is installed.
70 +#
71 +# See: http://www.freedesktop.org/wiki/Software/systemd/catalog
72 +systemd_update_catalog() {
73 + debug-print-function ${FUNCNAME} "${@}"
74 +
75 + # Make sure to work on the correct system.
76 + local journalctl=${EPREFIX}/usr/bin/journalctl
77 + if [[ -x ${journalctl} ]]; then
78 + ebegin "Updating systemd journal catalogs"
79 + journalctl --update-catalog
80 + eend $?
81 + else
82 + debug-print "${FUNCNAME}: journalctl not found."
83 + fi
84 +}