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

Attachments

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