Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 4/4] gnome2.eclass: move icon handling code to xdg.eclass
Date: Wed, 20 Jun 2018 09:19:41
Message-Id: 1529486369.2506.30.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH 4/4] gnome2.eclass: move icon handling code to xdg.eclass by "Marty E. Plummer"
1 W dniu śro, 20.06.2018 o godzinie 04∶04 -0500, użytkownik Marty E.
2 Plummer napisał:
3 > On Wed, Jun 20, 2018 at 09:27:54AM +0200, Michał Górny wrote:
4 > > W dniu śro, 20.06.2018 o godzinie 02∶10 -0500, użytkownik Marty E.
5 > > Plummer napisał:
6 > > > ---
7 > > > eclass/gnome2.eclass | 7 -------
8 > > > eclass/xdg.eclass | 27 ++++++++++++++++++++++-----
9 > > > 2 files changed, 22 insertions(+), 12 deletions(-)
10 > > >
11 > > > diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
12 > > > index 6db6d08b14e..5b81cb4f01a 100644
13 > > > --- a/eclass/gnome2.eclass
14 > > > +++ b/eclass/gnome2.eclass
15 > > > @@ -315,7 +315,6 @@ gnome2_src_install() {
16 > > > gnome2_pkg_preinst() {
17 > > > xdg_pkg_preinst
18 > > > gnome2_gconf_savelist
19 > > > - gnome2_icon_savelist
20 > > > gnome2_schemas_savelist
21 > > > gnome2_scrollkeeper_savelist
22 > > > gnome2_gdk_pixbuf_savelist
23 > > > @@ -337,9 +336,6 @@ gnome2_pkg_preinst() {
24 > > > gnome2_pkg_postinst() {
25 > > > xdg_pkg_postinst
26 > > > gnome2_gconf_install
27 > > > - if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
28 > > > - gnome2_icon_cache_update
29 > > > - fi
30 > > > if [[ -n ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
31 > > > gnome2_schemas_update
32 > > > fi
33 > > > @@ -361,9 +357,6 @@ gnome2_pkg_postinst() {
34 > > > # Handle scrollkeeper, GSettings, Icons, desktop and mime database updates.
35 > > > gnome2_pkg_postrm() {
36 > > > xdg_pkg_postrm
37 > > > - if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
38 > > > - gnome2_icon_cache_update
39 > > > - fi
40 > > > if [[ -n ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
41 > > > gnome2_schemas_update
42 > > > fi
43 > > > diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass
44 > > > index fd4816b8447..29830a5ee15 100644
45 > > > --- a/eclass/xdg.eclass
46 > > > +++ b/eclass/xdg.eclass
47 > > > @@ -39,9 +39,9 @@ xdg_src_prepare() {
48 > > >
49 > > > # @FUNCTION: xdg_pkg_preinst
50 > > > # @DESCRIPTION:
51 > > > -# Finds .desktop and mime info files for later handling in pkg_postinst.
52 > > > -# Locations are stored in XDG_ECLASS_DESKTOPFILES and XDG_ECLASS_MIMEINFOFILES
53 > > > -# respectively.
54 > > > +# Finds .desktop, icon, and mime info files for later handling in pkg_postinst.
55 > > > +# Locations are stored in XDG_ECLASS_DESKTOPFILES, XDG_ECLASS_ICONS and
56 > > > +# XDG_ECLASS_MIMEINFOFILES respectively.
57 > > > xdg_pkg_preinst() {
58 > > > local f
59 > > >
60 > > > @@ -50,6 +50,11 @@ xdg_pkg_preinst() {
61 > > > XDG_ECLASS_DESKTOPFILES+=( ${f} )
62 > > > done < <(cd "${D}" && find 'usr/share/applications' -type f -print0 2>/dev/null)
63 > > >
64 > > > + XDG_ECLASS_ICONS=()
65 > > > + while IFS= read -r -d '' f; do
66 > > > + XDG_ECLASS_ICONS+=( ${f} )
67 > > > + done < <(cd "${D}" && find 'usr/share/icons' -type f -print0 2>/dev/null)
68 > >
69 > > If you inline it anyway, why add xdg_*_savelist for it?
70 > >
71 >
72 > Too keep a stub that still 'works' for ebuilds using
73 > gnome2_icon_savelist from gnome2-utils.eclass.
74 > > > +
75
76 But given it's unnecessary... you could also keep the stub in gnome2-
77 utils and not introduce additional unnecessary stub.
78
79 --
80 Best regards,
81 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] [PATCH 4/4] gnome2.eclass: move icon handling code to xdg.eclass "Marty E. Plummer" <hanetzer@×××××××××.com>