From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 22C99139694 for ; Sat, 8 Jul 2017 19:56:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ACC9F2741D0; Sat, 8 Jul 2017 19:56:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6399E2740DB for ; Sat, 8 Jul 2017 19:56:00 +0000 (UTC) Received: from localhost.localdomain (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 61D72341AB5; Sat, 8 Jul 2017 19:55:58 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: gnome@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH] gnome2*.eclass: Move the preinst conditional out of gnome2_schemas_update Date: Sat, 8 Jul 2017 21:55:53 +0200 Message-Id: <20170708195553.8174-1-mgorny@gentoo.org> X-Mailer: git-send-email 2.13.2 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: c2590c96-0b17-49dc-a0f3-db6d820ca93d X-Archives-Hash: 3048ab5f98500b26ca7a9de0a9556c84 Move the GNOME2_ECLASS_GLIB_SCHEMAS conditional from gnome2_schemas_update straight into the implementation of gnome2.eclass postinst/postrm. This variable is set in preinst to indicate whether any files were installed. However, the updater itself does not use the list in any way and updates all the schemas anyway. Therefore, avoid requiring the ebuilds to explicitly define preinst/postinst when it is known that the package installs schemas, and instead let gnome2_schemas_update called in postinst/postrm update schemas unconditionally. --- eclass/gnome2-utils.eclass | 5 ----- eclass/gnome2.eclass | 8 ++++++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass index a89b9885c391..9b4296c11fad 100644 --- a/eclass/gnome2-utils.eclass +++ b/eclass/gnome2-utils.eclass @@ -381,11 +381,6 @@ gnome2_schemas_update() { return fi - if [[ -z ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then - debug-print "No GSettings schemas to update" - return - fi - ebegin "Updating GSettings schemas" ${updater} --allow-any-name "$@" "${EROOT%/}/usr/share/glib-2.0/schemas" &>/dev/null eend $? diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass index cb233e747605..d2b45ad560b3 100644 --- a/eclass/gnome2.eclass +++ b/eclass/gnome2.eclass @@ -340,7 +340,9 @@ gnome2_pkg_postinst() { if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then gnome2_icon_cache_update fi - gnome2_schemas_update + if [[ -z ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then + gnome2_schemas_update + fi gnome2_scrollkeeper_update gnome2_gdk_pixbuf_update @@ -362,7 +364,9 @@ gnome2_pkg_postrm() { if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then gnome2_icon_cache_update fi - gnome2_schemas_update + if [[ -z ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then + gnome2_schemas_update + fi gnome2_scrollkeeper_update if [[ ${#GNOME2_ECLASS_GIO_MODULES[@]} -gt 0 ]]; then -- 2.13.2