Gentoo Archives: gentoo-dev

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

Replies