Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-portage-dev] [PATCH] postinst-qa-check.d: Skip checks if required tools are missing
Date: Mon, 02 Oct 2017 15:36:16
Message-Id: 20171002153607.20525-1-mgorny@gentoo.org
1 Closes: https://bugs.gentoo.org/631820
2 ---
3 bin/postinst-qa-check.d/50gnome2-utils | 2 ++
4 bin/postinst-qa-check.d/50xdg-utils | 4 ++++
5 2 files changed, 6 insertions(+)
6
7 diff --git a/bin/postinst-qa-check.d/50gnome2-utils b/bin/postinst-qa-check.d/50gnome2-utils
8 index 569633fe3..7f1b0b847 100644
9 --- a/bin/postinst-qa-check.d/50gnome2-utils
10 +++ b/bin/postinst-qa-check.d/50gnome2-utils
11 @@ -1,6 +1,8 @@
12 # check for missing calls to gnome2-utils regen functions
13
14 gnome2_icon_cache_check() {
15 + type -P gtk-update-icon-cache &>/dev/null || return
16 +
17 local d f all_files=() missing
18 for d in usr/share/icons/*/; do
19 # gnome2_icon_cache_update updates only themes with an index
20 diff --git a/bin/postinst-qa-check.d/50xdg-utils b/bin/postinst-qa-check.d/50xdg-utils
21 index 9164f8dc1..9f5ae7cb9 100644
22 --- a/bin/postinst-qa-check.d/50xdg-utils
23 +++ b/bin/postinst-qa-check.d/50xdg-utils
24 @@ -1,6 +1,8 @@
25 # check for missing calls to xdg-utils regen functions
26
27 xdg_desktop_database_check() {
28 + type -P update-desktop-database &>/dev/null || return
29 +
30 local d f missing
31 for d in usr/share/applications; do
32 [[ -d ${d} ]] || continue
33 @@ -39,6 +41,8 @@ xdg_desktop_database_check() {
34 }
35
36 xdg_mimeinfo_database_check() {
37 + type -P update-mime-database &>/dev/null || return
38 +
39 local d f missing
40 for d in usr/share/mime; do
41 [[ -d ${d} ]] || continue
42 --
43 2.14.2

Replies