public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes
@ 2017-04-17 11:07 Michał Górny
  2017-04-17 11:07 ` [gentoo-dev] [PATCH 2/7] gnome2.eclass: Move GNOME2_ECLASS_ICONS conditional from gnome2-utils Michał Górny
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Michał Górny @ 2017-04-17 11:07 UTC (permalink / raw)
  To: gentoo-dev; +Cc: gnome, Michał Górny

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



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-dev] [PATCH 2/7] gnome2.eclass: Move GNOME2_ECLASS_ICONS conditional from gnome2-utils
  2017-04-17 11:07 [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes Michał Górny
@ 2017-04-17 11:07 ` Michał Górny
  2017-04-17 11:07 ` [gentoo-dev] [PATCH 3/7] kde4-base.eclass: " Michał Górny
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2017-04-17 11:07 UTC (permalink / raw)
  To: gentoo-dev; +Cc: gnome, Michał Górny

---
 eclass/gnome2.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 8a83297b0959..feb6301221ea 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -337,7 +337,9 @@ gnome2_pkg_preinst() {
 gnome2_pkg_postinst() {
 	xdg_pkg_postinst
 	gnome2_gconf_install
-	gnome2_icon_cache_update
+	if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
+		gnome2_icon_cache_update
+	fi
 	gnome2_schemas_update
 	gnome2_scrollkeeper_update
 	gnome2_gdk_pixbuf_update
-- 
2.12.2



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-dev] [PATCH 3/7] kde4-base.eclass: Move GNOME2_ECLASS_ICONS conditional from gnome2-utils
  2017-04-17 11:07 [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes Michał Górny
  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 ` Michał Górny
  2017-04-17 11:07 ` [gentoo-dev] [PATCH 4/7] kde5.eclass: " Michał Górny
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2017-04-17 11:07 UTC (permalink / raw)
  To: gentoo-dev; +Cc: gnome, Michał Górny

---
 eclass/kde4-base.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass
index 999c8a05fee2..97f4dfd4eda9 100644
--- a/eclass/kde4-base.eclass
+++ b/eclass/kde4-base.eclass
@@ -907,7 +907,9 @@ kde4-base_pkg_preinst() {
 kde4-base_pkg_postinst() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	gnome2_icon_cache_update
+	if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
+		gnome2_icon_cache_update
+	fi
 	fdo-mime_desktop_database_update
 	fdo-mime_mime_database_update
 	buildsycoca
-- 
2.12.2



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-dev] [PATCH 4/7] kde5.eclass: Move GNOME2_ECLASS_ICONS conditional from gnome2-utils
  2017-04-17 11:07 [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes Michał Górny
  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 ` Michał Górny
  2017-04-17 11:07 ` [gentoo-dev] [PATCH 5/7] xfconf.eclass: " Michał Górny
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2017-04-17 11:07 UTC (permalink / raw)
  To: gentoo-dev; +Cc: gnome, Michał Górny

---
 eclass/kde5.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index 106383bb05c3..9ed664be60c7 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -704,7 +704,9 @@ kde5_pkg_preinst() {
 kde5_pkg_postinst() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	gnome2_icon_cache_update
+	if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
+		gnome2_icon_cache_update
+	fi
 	xdg_pkg_postinst
 
 	if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
-- 
2.12.2



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-dev] [PATCH 5/7] xfconf.eclass: Move GNOME2_ECLASS_ICONS conditional from gnome2-utils
  2017-04-17 11:07 [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes Michał Górny
                   ` (2 preceding siblings ...)
  2017-04-17 11:07 ` [gentoo-dev] [PATCH 4/7] kde5.eclass: " Michał Górny
@ 2017-04-17 11:07 ` 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
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2017-04-17 11:07 UTC (permalink / raw)
  To: gentoo-dev; +Cc: gnome, Michał Górny

---
 eclass/xfconf.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/xfconf.eclass b/eclass/xfconf.eclass
index 2655420ddd35..b91d0fe1eda3 100644
--- a/eclass/xfconf.eclass
+++ b/eclass/xfconf.eclass
@@ -139,7 +139,9 @@ xfconf_pkg_postinst() {
 	debug-print-function ${FUNCNAME} "$@"
 	fdo-mime_desktop_database_update
 	fdo-mime_mime_database_update
-	gnome2_icon_cache_update
+	if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
+		gnome2_icon_cache_update
+	fi
 }
 
 # @FUNCTION: xfconf_pkg_postrm
-- 
2.12.2



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-dev] [PATCH 6/7] gnome2-utils.eclass: Remove GNOME2_ICONS conditional (moved to gnome2)
  2017-04-17 11:07 [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes Michał Górny
                   ` (3 preceding siblings ...)
  2017-04-17 11:07 ` [gentoo-dev] [PATCH 5/7] xfconf.eclass: " Michał Górny
@ 2017-04-17 11:07 ` 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
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2017-04-17 11:07 UTC (permalink / raw)
  To: gentoo-dev; +Cc: gnome, Michał Górny

---
 eclass/gnome2-utils.eclass | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index 7db092e1ec66..a89b9885c391 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -230,11 +230,6 @@ gnome2_icon_cache_update() {
 		return
 	fi
 
-	if [[ -z "${GNOME2_ECLASS_ICONS}" ]]; then
-		debug-print "No icon cache to update"
-		return
-	fi
-
 	ebegin "Updating icons cache"
 
 	local retval=0
-- 
2.12.2



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-dev] [PATCH 7/7] chromium.eclass: Remove no-longer necessary gnome2_icon_savelist call
  2017-04-17 11:07 [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes Michał Górny
                   ` (4 preceding siblings ...)
  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 ` 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-25 18:45 ` Michał Górny
  7 siblings, 1 reply; 11+ messages in thread
From: Michał Górny @ 2017-04-17 11:07 UTC (permalink / raw)
  To: gentoo-dev; +Cc: gnome, Michał Górny

---
 eclass/chromium.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/chromium.eclass b/eclass/chromium.eclass
index 5f8c53cabf35..fcc02dd6e028 100644
--- a/eclass/chromium.eclass
+++ b/eclass/chromium.eclass
@@ -120,7 +120,7 @@ chromium_remove_language_paks() {
 }
 
 chromium_pkg_preinst() {
-	gnome2_icon_savelist
+	:
 }
 
 chromium_pkg_postinst() {
-- 
2.12.2



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes
  2017-04-17 11:07 [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes Michał Górny
                   ` (5 preceding siblings ...)
  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-17 11:43 ` Gilles Dartiguelongue
  2017-04-17 13:32   ` Mart Raudsepp
  2017-04-25 18:45 ` Michał Górny
  7 siblings, 1 reply; 11+ messages in thread
From: Gilles Dartiguelongue @ 2017-04-17 11:43 UTC (permalink / raw)
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

Le lundi 17 avril 2017 à 13:07 +0200, Michał Górny a écrit :
> 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.

Looks good.

-- 
Gilles Dartiguelongue <eva@gentoo.org>
Gentoo

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 364 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes
  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
  0 siblings, 0 replies; 11+ messages in thread
From: Mart Raudsepp @ 2017-04-17 13:32 UTC (permalink / raw)
  To: gentoo-dev; +Cc: gnome

Ühel kenal päeval, E, 17.04.2017 kell 13:43, kirjutas Gilles
Dartiguelongue:
> Le lundi 17 avril 2017 à 13:07 +0200, Michał Górny a écrit :
> > 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.
> 
> Looks good.

I haven't looked at this yet, but it would be nice if a bunch of
gnome2.eclass and gnome2-utils.eclass would be pushed at once after
review for cache regeneration purposes. But of course not as important
as eutils was, but still hundreds - with gnome2-utils maybe a thousand.

Potential bugs that might end up needing an eclass change are at least
the following (might be more):
https://bugs.gentoo.org/615144
https://bugs.gentoo.org/613364
https://bugs.gentoo.org/show_bug.cgi?id=gnome2.eclass tracker


Mart


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH 7/7] chromium.eclass: Remove no-longer necessary gnome2_icon_savelist call
  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
  0 siblings, 0 replies; 11+ messages in thread
From: Mike Gilbert @ 2017-04-18 14:14 UTC (permalink / raw)
  To: Gentoo Dev; +Cc: Michał Górny

On Mon, Apr 17, 2017 at 7:07 AM, Michał Górny <mgorny@gentoo.org> wrote:
> ---
>  eclass/chromium.eclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/eclass/chromium.eclass b/eclass/chromium.eclass
> index 5f8c53cabf35..fcc02dd6e028 100644
> --- a/eclass/chromium.eclass
> +++ b/eclass/chromium.eclass
> @@ -120,7 +120,7 @@ chromium_remove_language_paks() {
>  }
>
>  chromium_pkg_preinst() {
> -       gnome2_icon_savelist
> +       :
>  }
>
>  chromium_pkg_postinst() {
> --
> 2.12.2

I last-rited this eclass back in February, so you can skip this patch.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes
  2017-04-17 11:07 [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes Michał Górny
                   ` (6 preceding siblings ...)
  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-25 18:45 ` Michał Górny
  7 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2017-04-25 18:45 UTC (permalink / raw)
  To: gentoo-dev; +Cc: gnome

[-- Attachment #1: Type: text/plain, Size: 573 bytes --]

On pon, 2017-04-17 at 13:07 +0200, Michał Górny wrote:
> 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(-)
> 

Merged the set.

-- 
Best regards,
Michał Górny

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-04-25 18:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-17 11:07 [gentoo-dev] [PATCH 1/7] gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes Michał Górny
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox