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 7035D139694 for ; Mon, 17 Apr 2017 11:08:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 41E4B21C012; Mon, 17 Apr 2017 11:08:00 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 010D1E0BFC for ; Mon, 17 Apr 2017 11:07:59 +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 890E3341301; Mon, 17 Apr 2017 11:07:57 +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 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes Date: Mon, 17 Apr 2017 13:07:41 +0200 Message-Id: <20170417110747.16196-1-mgorny@gentoo.org> X-Mailer: git-send-email 2.12.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: da66841b-142e-42cc-b7f4-9d1ce5cadc76 X-Archives-Hash: 07b9eb119590abba6ec2ea48af7a132e 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