From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 98F8E1384B4 for ; Mon, 30 Nov 2015 15:05:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0256121C0E7; Mon, 30 Nov 2015 15:01:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A41B021C0DF for ; Mon, 30 Nov 2015 15:01:38 +0000 (UTC) Received: from localhost.localdomain (d202-251.icpnet.pl [109.173.202.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 0155D34068A; Mon, 30 Nov 2015 15:01:35 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 7/8] systemd.eclass: Allow systemd_update_catalog only during pkg_post* Date: Mon, 30 Nov 2015 16:01:21 +0100 Message-Id: <1448895682-19312-8-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1448895682-19312-1-git-send-email-mgorny@gentoo.org> References: <1448636008-13184-1-git-send-email-mgorny@gentoo.org> <1448895682-19312-1-git-send-email-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 5bd43419-a362-42ef-afbd-3056c768e10b X-Archives-Hash: dce059c2e3f8653ec59ef9c1af66f79b --- eclass/systemd.eclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index c0c21a1..ae933aa 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -353,7 +353,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. @@ -362,6 +362,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