From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: gnome@gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes
Date: Mon, 17 Apr 2017 13:07:41 +0200 [thread overview]
Message-ID: <20170417110747.16196-1-mgorny@gentoo.org> (raw)
Make the gnome2_icon_cache_update function update all icon themes rather
than depending on gnome2_icon_savelist to select themes to update. This
makes the function easier to use whenever the developer needs it
explicitly (i.e. knows that themes are installed), while the overhead of
regenerating multiple caches is neglible.
---
eclass/gnome2-utils.eclass | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index f2aa2391a532..7db092e1ec66 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -240,30 +240,30 @@ gnome2_icon_cache_update() {
local retval=0
local fails=( )
- for dir in ${GNOME2_ECLASS_ICONS}
+ for dir in "${EROOT%/}"/usr/share/icons/*
do
- if [[ -f "${EROOT}${dir}/index.theme" ]] ; then
+ if [[ -f "${dir}/index.theme" ]] ; then
local rv=0
- "${updater}" -qf "${EROOT}${dir}"
+ "${updater}" -qf "${dir}"
rv=$?
if [[ ! $rv -eq 0 ]] ; then
- debug-print "Updating cache failed on ${EROOT}${dir}"
+ debug-print "Updating cache failed on ${dir}"
# Add to the list of failures
- fails[$(( ${#fails[@]} + 1 ))]="${EROOT}${dir}"
+ fails+=( "${dir}" )
retval=2
fi
- elif [[ $(ls "${EROOT}${dir}") = "icon-theme.cache" ]]; then
+ elif [[ $(ls "${dir}") = "icon-theme.cache" ]]; then
# Clear stale cache files after theme uninstallation
- rm "${EROOT}${dir}/icon-theme.cache"
+ rm "${dir}/icon-theme.cache"
fi
- if [[ -z $(ls "${EROOT}${dir}") ]]; then
+ if [[ -z $(ls "${dir}") ]]; then
# Clear empty theme directories after theme uninstallation
- rmdir "${EROOT}${dir}"
+ rmdir "${dir}"
fi
done
--
2.12.2
next reply other threads:[~2017-04-17 11:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-17 11:07 Michał Górny [this message]
2017-04-17 11:07 ` [gentoo-dev] [PATCH 2/7] gnome2.eclass: Move GNOME2_ECLASS_ICONS conditional from gnome2-utils Michał Górny
2017-04-17 11:07 ` [gentoo-dev] [PATCH 3/7] kde4-base.eclass: " Michał Górny
2017-04-17 11:07 ` [gentoo-dev] [PATCH 4/7] kde5.eclass: " Michał Górny
2017-04-17 11:07 ` [gentoo-dev] [PATCH 5/7] xfconf.eclass: " Michał Górny
2017-04-17 11:07 ` [gentoo-dev] [PATCH 6/7] gnome2-utils.eclass: Remove GNOME2_ICONS conditional (moved to gnome2) Michał Górny
2017-04-17 11:07 ` [gentoo-dev] [PATCH 7/7] chromium.eclass: Remove no-longer necessary gnome2_icon_savelist call Michał Górny
2017-04-18 14:14 ` Mike Gilbert
2017-04-17 11:43 ` [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes Gilles Dartiguelongue
2017-04-17 13:32 ` Mart Raudsepp
2017-04-25 18:45 ` Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170417110747.16196-1-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=gnome@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox