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 706AE138334 for ; Wed, 20 Jun 2018 09:18:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 17C92E0A87; Wed, 20 Jun 2018 09:18:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5AB61E0A76 for ; Wed, 20 Jun 2018 09:18:52 +0000 (UTC) Received: from pomiot (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 063AB335CB8; Wed, 20 Jun 2018 09:18:49 +0000 (UTC) Message-ID: <1529486326.2506.29.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH 3/4] gnome2-utils: move icon functions into xdg-utils From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Date: Wed, 20 Jun 2018 11:18:46 +0200 In-Reply-To: <20180620090332.kghnuxdygvz72nhm@proprietary-killer> References: <20180620071053.11589-1-hanetzer@startmail.com> <20180620071053.11589-3-hanetzer@startmail.com> <1529479621.2506.3.camel@gentoo.org> <20180620090332.kghnuxdygvz72nhm@proprietary-killer> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-6HZu+AfFG/aQXn+7IHa+" X-Mailer: Evolution 3.24.6 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 Mime-Version: 1.0 X-Archives-Salt: efbcd07a-e824-40f4-8402-badb51d83750 X-Archives-Hash: a16bf2b40a7456165fa40ddeb766eb70 --=-6HZu+AfFG/aQXn+7IHa+ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable W dniu =C5=9Bro, 20.06.2018 o godzinie 04=E2=88=B603=E2=80=89-0500, u=C5=BC= ytkownik Marty E. Plummer napisa=C5=82: > On Wed, Jun 20, 2018 at 09:27:01AM +0200, Micha=C5=82 G=C3=B3rny wrote: > > W dniu =C5=9Bro, 20.06.2018 o godzinie 02=E2=88=B610=E2=80=89-0500, u= =C5=BCytkownik Marty E. > > Plummer napisa=C5=82: > > > Kept some dummy stub functions in place in order to maintain > > > functionality of existing ebuilds, along with a QA warning to migrate > > > from one eclass to the other. > > > --- > > > eclass/gnome2-utils.eclass | 73 ++++++---------------------------- > > > eclass/xdg-utils.eclass | 80 ++++++++++++++++++++++++++++++++++++= ++ > > > 2 files changed, 91 insertions(+), 62 deletions(-) > > >=20 > > > diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass > > > index 14fb9e7420c..a355f0f4f13 100644 > > > --- a/eclass/gnome2-utils.eclass > > > +++ b/eclass/gnome2-utils.eclass > > > @@ -40,12 +40,6 @@ esac > > > # Path to scrollkeeper-update > > > : ${SCROLLKEEPER_UPDATE_BIN:=3D"/usr/bin/scrollkeeper-update"} > > > =20 > > > -# @ECLASS-VARIABLE: GTK_UPDATE_ICON_CACHE > > > -# @INTERNAL > > > -# @DESCRIPTION: > > > -# Path to gtk-update-icon-cache > > > -: ${GTK_UPDATE_ICON_CACHE:=3D"/usr/bin/gtk-update-icon-cache"} > > > - > > > # @ECLASS-VARIABLE: GLIB_COMPILE_SCHEMAS > > > # @INTERNAL > > > # @DESCRIPTION: > > > @@ -203,68 +197,23 @@ gnome2_gconf_uninstall() { > > > =20 > > > # @FUNCTION: gnome2_icon_savelist > > > # @DESCRIPTION: > > > -# Find the icons that are about to be installed and save their locat= ion > > > -# in the GNOME2_ECLASS_ICONS environment variable. This is only > > > -# necessary for eclass implementations that call > > > -# gnome2_icon_cache_update conditionally. > > > -# This function should be called from pkg_preinst. > > > +# Deprecated. Use xdg_icon_savelist from xdg-utils.eclass instead. > > > gnome2_icon_savelist() { > > > - has ${EAPI:-0} 0 1 2 && ! use prefix && ED=3D"${D}" > > > - pushd "${ED}" > /dev/null || die > > > - export GNOME2_ECLASS_ICONS=3D$(find 'usr/share/icons' -maxdepth 1 -= mindepth 1 -type d 2> /dev/null) > > > - popd > /dev/null || die > > > + eqawarn "QA warning: gnome2_icon_savelist has been moved to xdg-uti= ls.eclass" > > > + eqawarn "and is now called xdg_icon_savelist. Please migrate your e= build and" > > > + eqawarn "eclasses to use it" > > > + xdg_icon_savelist > > > + GNOME2_ECLASS_ICONS=3D"${XDG_ECLASS_ICONS}" > > > } > > > =20 > > > # @FUNCTION: gnome2_icon_cache_update > > > # @DESCRIPTION: > > > -# Updates Gtk+ icon cache files under /usr/share/icons. > > > -# This function should be called from pkg_postinst and pkg_postrm. > > > +# Deprecated. Use xdg_icon_cache_update from xdg-utils.eclass instea= d. > > > gnome2_icon_cache_update() { > > > - has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=3D"${ROOT}" > > > - local updater=3D"${EROOT%/}${GTK_UPDATE_ICON_CACHE}" > > > - > > > - if [[ ! -x "${updater}" ]] ; then > > > - debug-print "${updater} is not executable" > > > - return > > > - fi > > > - > > > - ebegin "Updating icons cache" > > > - > > > - local retval=3D0 > > > - local fails=3D( ) > > > - > > > - for dir in "${EROOT%/}"/usr/share/icons/* > > > - do > > > - if [[ -f "${dir}/index.theme" ]] ; then > > > - local rv=3D0 > > > - > > > - "${updater}" -qf "${dir}" > > > - rv=3D$? > > > - > > > - if [[ ! $rv -eq 0 ]] ; then > > > - debug-print "Updating cache failed on ${dir}" > > > - > > > - # Add to the list of failures > > > - fails+=3D( "${dir}" ) > > > - > > > - retval=3D2 > > > - fi > > > - elif [[ $(ls "${dir}") =3D "icon-theme.cache" ]]; then > > > - # Clear stale cache files after theme uninstallation > > > - rm "${dir}/icon-theme.cache" > > > - fi > > > - > > > - if [[ -z $(ls "${dir}") ]]; then > > > - # Clear empty theme directories after theme uninstallation > > > - rmdir "${dir}" > > > - fi > > > - done > > > - > > > - eend ${retval} > > > - > > > - for f in "${fails[@]}" ; do > > > - eerror "Failed to update cache with icon $f" > > > - done > > > + eqawarn "QA warning: gnome2_icon_cache_update has been moved to xdg= -utils.eclass" > > > + eqawarn "and is now called xdg_icon_cache_update. Please migrate yo= ur ebuild and" > > > + eqawarn "eclasses to use it" > > > + xdg_icon_cache_update > > > } > > > =20 > > > # @FUNCTION: gnome2_omf_fix > >=20 > > 1. Why not make those two fatal in EAPI 7? > >=20 >=20 > Sounds ok. There can currently be no EAPI 7 ebuilds for this, so any > ebuild which updates their eapi can do the migration then. > > 2. I don't think suddenly having a lot of ebuilds eqawarn about this > > in existing EAPIs is going to be productive. > >=20 >=20 > Reasonable. I wasn't thinking in terms of that, since I wasn't making it > fatal in EAPI 7. Is there a non-ugly way to do multiline die statements? > > >=20 You just do multi-line eerror, followed by short die. --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-6HZu+AfFG/aQXn+7IHa+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEbbsHzE8NrQbqCv5BsHoa6u+0Rk4FAlsqG/ZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDZE QkIwN0NDNEYwREFEMDZFQTBBRkU0MUIwN0ExQUVBRUZCNDQ2NEUACgkQsHoa6u+0 Rk5zExAApOyGwm2UdBF5xw7veYCsXi1noEtuIh+0LkNeb6F24cWKkb8ZjsiBQkOI Vy7189W4tGT4YHPIPi0sx85VCMKmduioEkNRSedyt6dxhZq6TOvtNQnlx8J73h3j jqSMgfrDV3nvcVF/xYmiyY0sCa5Y7yC7zQDQTQk9SMpDm60o1m1+24PtMAQS6m3x nqG6T2qqWekirtM4qISLcNsfX174iZAn481+TKzKbegR8CpLAqKWN75cjw7SHlmV CQAFyimnGpitP1q4NV0xgi15QD7Khvtr6vRLFsBd6S4NxdIoyIHlCZlVE+nD+DnL wpx9VdgvtoV9ue/dc4pVjzZQwbgeF1hk+gnUXtiMBkKAwBqJdKjBGCEa8llVxSJP vGt0V1/PtDSGsYVVP5xnvhNGyvF+vYVt1GPkkmYE0WxsEWGJHFdnEMJXghRoktO4 2Rh5IKPKe4f+xRdj+UAuFayE8SHY1ampz3uuygblUkVeq/nhVcluvR1IacCegPed CID606AXSUVIewUgtZBztkUW27pDQk/Q4+E3JRMEC2qODzVgorTT+EJg1CoRXdWt Tl82CKW980YUzY0UMprEaKNfE2vLa5qom6D+Sp4DMhsx63+flThMRA7MeEYbkX0b Y5MvsvU/SI5vVefpkLMhNbYTSwitQqTb6Br0nSC3gJhzMLZYbeo= =tOAy -----END PGP SIGNATURE----- --=-6HZu+AfFG/aQXn+7IHa+--