commit:     38deed53c51aa9e75bd8c933f84121af993af7a2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  2 15:34:21 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Oct  2 16:56:21 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=38deed53

postinst-qa-check.d: Skip checks if required tools are missing

Closes: https://bugs.gentoo.org/631820
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/postinst-qa-check.d/50gnome2-utils | 2 ++
 bin/postinst-qa-check.d/50xdg-utils    | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/bin/postinst-qa-check.d/50gnome2-utils 
b/bin/postinst-qa-check.d/50gnome2-utils
index 569633fe3..7f1b0b847 100644
--- a/bin/postinst-qa-check.d/50gnome2-utils
+++ b/bin/postinst-qa-check.d/50gnome2-utils
@@ -1,6 +1,8 @@
 # check for missing calls to gnome2-utils regen functions
 
 gnome2_icon_cache_check() {
+       type -P gtk-update-icon-cache &>/dev/null || return
+
        local d f all_files=() missing
        for d in usr/share/icons/*/; do
                # gnome2_icon_cache_update updates only themes with an index

diff --git a/bin/postinst-qa-check.d/50xdg-utils 
b/bin/postinst-qa-check.d/50xdg-utils
index 9164f8dc1..9f5ae7cb9 100644
--- a/bin/postinst-qa-check.d/50xdg-utils
+++ b/bin/postinst-qa-check.d/50xdg-utils
@@ -1,6 +1,8 @@
 # check for missing calls to xdg-utils regen functions
 
 xdg_desktop_database_check() {
+       type -P update-desktop-database &>/dev/null || return
+
        local d f missing
        for d in usr/share/applications; do
                [[ -d ${d} ]] || continue
@@ -39,6 +41,8 @@ xdg_desktop_database_check() {
 }
 
 xdg_mimeinfo_database_check() {
+       type -P update-mime-database &>/dev/null || return
+
        local d f missing
        for d in usr/share/mime; do
                [[ -d ${d} ]] || continue

Reply via email to