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 5F780138334 for ; Wed, 20 Jun 2018 07:25:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 106BAE0984; Wed, 20 Jun 2018 07:25:39 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 7556CE083B for ; Wed, 20 Jun 2018 07:25:38 +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 796C0335C9A; Wed, 20 Jun 2018 07:25:35 +0000 (UTC) Message-ID: <1529479530.2506.1.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH 2/4] gnome2-utils.eclass: make EAPI 7 ready From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: "Marty E. Plummer" Date: Wed, 20 Jun 2018 09:25:30 +0200 In-Reply-To: <20180620071053.11589-2-hanetzer@startmail.com> References: <20180620071053.11589-1-hanetzer@startmail.com> <20180620071053.11589-2-hanetzer@startmail.com> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-9uVLfS3VwkJPApzpPRls" 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: f459ab17-4119-4bcd-bcfc-5101bb3faa2c X-Archives-Hash: 4bd1ac48399f41ad168a611915d48e57 --=-9uVLfS3VwkJPApzpPRls Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable W dniu =C5=9Bro, 20.06.2018 o godzinie 02=E2=88=B610=E2=80=89-0500, u=C5=BC= ytkownik Marty E. Plummer napisa=C5=82: > Use ${EROOT%/} whereever possible, as most of the directories and files > used in conjunction with it have a leading /; add missing leading / > where apropriate. >=20 > Package-Manager: Portage-2.3.40, Repoman-2.3.9 > --- > eclass/gnome2-utils.eclass | 41 ++++++++++++++++++-------------------- > 1 file changed, 19 insertions(+), 22 deletions(-) >=20 > diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass > index 65076ae2d61..14fb9e7420c 100644 > --- a/eclass/gnome2-utils.eclass > +++ b/eclass/gnome2-utils.eclass > @@ -18,7 +18,7 @@ > inherit eutils xdg-utils > =20 > case "${EAPI:-0}" in > - 0|1|2|3|4|5|6) ;; > + 0|1|2|3|4|5|6|7) ;; > *) die "EAPI=3D${EAPI} is not supported" ;; > esac > =20 > @@ -82,9 +82,6 @@ esac > # @DESCRIPTION: > # List of gdk-pixbuf loaders provided by the package > =20 > -DEPEND=3D">=3Dsys-apps/sed-4" > - > - > # @FUNCTION: gnome2_environment_reset > # @DESCRIPTION: > # Reset various variables inherited from root's evironment to a reasonab= le > @@ -101,7 +98,7 @@ gnome2_environment_reset() { > # Ensure we don't rely on dconf/gconf while building, bug #511946 > export GSETTINGS_BACKEND=3D"memory" > =20 > - if has ${EAPI:-0} 6; then > + if has ${EAPI:-0} 6 7; then > # Try to cover the packages honoring this variable, bug #508124 > export GST_INSPECT=3D"$(type -P true)" > =20 > @@ -129,7 +126,7 @@ gnome2_gconf_savelist() { > # This function should be called from pkg_postinst. > gnome2_gconf_install() { > has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=3D"${ROOT}" > - local updater=3D"${EROOT}${GCONFTOOL_BIN}" > + local updater=3D"${EROOT%/}${GCONFTOOL_BIN}" > =20 > if [[ ! -x "${updater}" ]]; then > debug-print "${updater} is not executable" > @@ -149,9 +146,9 @@ gnome2_gconf_install() { > =20 > local F > for F in ${GNOME2_ECLASS_SCHEMAS}; do > - if [[ -e "${EROOT}${F}" ]]; then > + if [[ -e "${EROOT%/}${F}" ]]; then > debug-print "Installing schema: ${F}" > - "${updater}" --makefile-install-rule "${EROOT}${F}" 1>/dev/null > + "${updater}" --makefile-install-rule "${EROOT%/}${F}" 1>/dev/null > fi > done > =20 > @@ -170,7 +167,7 @@ gnome2_gconf_install() { > # database. > gnome2_gconf_uninstall() { > has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=3D"${ROOT}" > - local updater=3D"${EROOT}${GCONFTOOL_BIN}" > + local updater=3D"${EROOT%/}${GCONFTOOL_BIN}" > =20 > if [[ ! -x "${updater}" ]]; then > debug-print "${updater} is not executable" > @@ -189,9 +186,9 @@ gnome2_gconf_uninstall() { > =20 > local F > for F in ${GNOME2_ECLASS_SCHEMAS}; do > - if [[ -e "${EROOT}${F}" ]]; then > + if [[ -e "${EROOT%/}${F}" ]]; then > debug-print "Uninstalling gconf schema: ${F}" > - "${updater}" --makefile-uninstall-rule "${EROOT}${F}" 1>/dev/null > + "${updater}" --makefile-uninstall-rule "${EROOT%/}${F}" 1>/dev/null > fi > done > =20 > @@ -224,7 +221,7 @@ gnome2_icon_savelist() { > # This function should be called from pkg_postinst and pkg_postrm. > gnome2_icon_cache_update() { > has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=3D"${ROOT}" > - local updater=3D"${EROOT}${GTK_UPDATE_ICON_CACHE}" > + local updater=3D"${EROOT%/}${GTK_UPDATE_ICON_CACHE}" > =20 > if [[ ! -x "${updater}" ]] ; then > debug-print "${updater} is not executable" > @@ -339,7 +336,7 @@ gnome2_scrollkeeper_savelist() { > # This function should be called from pkg_postinst and pkg_postrm. > gnome2_scrollkeeper_update() { > has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=3D"${ROOT}" > - local updater=3D"${EROOT}${SCROLLKEEPER_UPDATE_BIN}" > + local updater=3D"${EROOT%/}${SCROLLKEEPER_UPDATE_BIN}" > =20 > if [[ ! -x "${updater}" ]] ; then > debug-print "${updater} is not executable" > @@ -352,7 +349,7 @@ gnome2_scrollkeeper_update() { > fi > =20 > ebegin "Updating scrollkeeper database ..." > - "${updater}" -q -p "${EROOT}${SCROLLKEEPER_DIR}" > + "${updater}" -q -p "${EROOT%/}${SCROLLKEEPER_DIR}" > eend $? > } > =20 > @@ -376,7 +373,7 @@ gnome2_schemas_savelist() { > # This function should be called from pkg_postinst and pkg_postrm. > gnome2_schemas_update() { > has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=3D"${ROOT}" > - local updater=3D"${EROOT}${GLIB_COMPILE_SCHEMAS}" > + local updater=3D"${EROOT%/}${GLIB_COMPILE_SCHEMAS}" > =20 > if [[ ! -x ${updater} ]]; then > debug-print "${updater} is not executable" > @@ -407,10 +404,10 @@ gnome2_gdk_pixbuf_savelist() { > # This function should be called from pkg_postinst and pkg_postrm. > gnome2_gdk_pixbuf_update() { > has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=3D"${ROOT}" > - local updater=3D"${EROOT}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders" > + local updater=3D"${EROOT%/}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders" > =20 > if [[ ! -x ${updater} ]]; then > - updater=3D"${EROOT}/usr/bin/gdk-pixbuf-query-loaders" > + updater=3D"${EROOT%/}/usr/bin/gdk-pixbuf-query-loaders" > fi > =20 > if [[ ! -x ${updater} ]]; then > @@ -427,7 +424,7 @@ gnome2_gdk_pixbuf_update() { > local tmp_file=3D$(emktemp) > ${updater} 1> "${tmp_file}" && > chmod 0644 "${tmp_file}" && > - cp -f "${tmp_file}" "${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/lo= aders.cache" && > + cp -f "${tmp_file}" "${EROOT%/}/usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0= /loaders.cache" && > rm "${tmp_file}" # don't replace this with mv, required for SELinux sup= port > eend $? > } > @@ -441,7 +438,7 @@ gnome2_query_immodules_gtk2() { > [[ ! -x ${updater} ]] && updater=3D${EPREFIX}/usr/bin/gtk-query-immodul= es-2.0 > =20 > ebegin "Updating gtk2 input method module cache" > - GTK_IM_MODULE_FILE=3D"${EROOT}usr/$(get_libdir)/gtk-2.0/2.10.0/immodule= s.cache" \ > + GTK_IM_MODULE_FILE=3D"${EROOT%/}/usr/$(get_libdir)/gtk-2.0/2.10.0/immod= ules.cache" \ > "${updater}" --update-cache > eend $? > } > @@ -455,7 +452,7 @@ gnome2_query_immodules_gtk3() { > [[ ! -x ${updater} ]] && updater=3D${EPREFIX}/usr/bin/gtk-query-immodul= es-3.0 > =20 > ebegin "Updating gtk3 input method module cache" > - GTK_IM_MODULE_FILE=3D"${EROOT}usr/$(get_libdir)/gtk-3.0/3.0.0/immodules= .cache" \ > + GTK_IM_MODULE_FILE=3D"${EROOT%/}/usr/$(get_libdir)/gtk-3.0/3.0.0/immodu= les.cache" \ > "${updater}" --update-cache > eend $? > } > @@ -467,10 +464,10 @@ gnome2_query_immodules_gtk3() { > # This function should be called from pkg_postinst and pkg_postrm. > gnome2_giomodule_cache_update() { > has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=3D"${ROOT}" > - local updater=3D"${EROOT}/usr/bin/${CHOST}-gio-querymodules" > + local updater=3D"${EROOT%/}/usr/bin/${CHOST}-gio-querymodules" > =20 > if [[ ! -x ${updater} ]]; then > - updater=3D"${EROOT}/usr/bin/gio-querymodules" > + updater=3D"${EROOT%/}/usr/bin/gio-querymodules" > fi > =20 > if [[ ! -x ${updater} ]]; then Move this *after* you've changed API of this eclass. --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-9uVLfS3VwkJPApzpPRls 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+0Rk4FAlsqAWtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDZE QkIwN0NDNEYwREFEMDZFQTBBRkU0MUIwN0ExQUVBRUZCNDQ2NEUACgkQsHoa6u+0 Rk5PcRAAjTy3Hdw5Db4naCKxixGOEktJm/iX7iE1xsbgw/7hzGzB1hr6G/GhY73R GhYRAxFmSdX80bEGST5OGJTfCihPhb9cTTXeh2032z0DeqrpdTIiulqQBaZtOTBF cs+uWfpFlHAzH8Dn3mTPFQBtjvQj7JcJEQrRHHf0UOSu1l7G2ImUMy6QOJpaoxOa /dKePat0aFycIW7vu5Blraos6s9wv2/JZrPoVK9ruZT2vETXmQYLzXyreiy7rvnj WQ0bats5NU+dRjCl1GlaDm0p82lD3n+XFsvjvFW46x0YzMHOptvDWOBSFe20PeCI OudT5wwgx7uML5yI85iE95tmgjbav18/1lttNBOu2JxzaADgstb/ZAsgZToggNY5 Qp6NJ31Fd/vhFKPQ2ywzkH8fH85BcfWcdg44nl2dPD2doJyGl+MjXfWErvqIPaC3 4+wy2KfHVvlShLTcOfcdI/22hchN96OX8vVIGS4Gm+nS3VR9irieoM4A6S+p8WS4 jc7lOTpJvWSWvQ9VV2KS43guIhzI4H7+S0A067jc/UkmkFox86SqyQKpaSx3PHLj V+m1j4tF0iPCyGgk7k24olKB4AB0xpmOdBSD5zwROvggydtRhEHW37F7ev8Af7RY GIIlwqmkJD8BALQ4G2aU64JiOfT8zIsjkmRM1OyaSLZbx3RlVoM= =9qB/ -----END PGP SIGNATURE----- --=-9uVLfS3VwkJPApzpPRls--