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 EF137138334 for ; Wed, 20 Jun 2018 07:12:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 842AAE086A; Wed, 20 Jun 2018 07:11:59 +0000 (UTC) Received: from mx-out1.startmail.com (mx-out1.startmail.com [145.131.90.139]) (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 AD39FE07BA for ; Wed, 20 Jun 2018 07:11:58 +0000 (UTC) From: "Marty E. Plummer" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=startmail.com; s=2017-11; t=1529478717; bh=rKD5tql2rlsSnRZeJ/e5wAJjlluOPAejQjnaNzANX98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nXrXJtisLCaztDeB+zGpate2/PkE+2DC5PBCiElEu745ph8xPSo4KWmlrqg3eSwjt Qi6S4biIRf4CKjzEadJ+bMVx2dbrzlI+26uQyuhuLt3BzEaWkyxFsWN5gUzv+oAlxN XI6q+nQ3nYJ7uOKcZsfgw1E/B+U1v6obQKAmdiw03UboNPvlDrFP3QVriunhJN4nC5 dYkwvJoalwSX55sbtCPJBYjdvPHrTOO4lod3TFN5vmM0xyeHM0aCiE6dajLslxIrEv 07fAAoKTlHSdPEaatV6ouGf0m+KSN/XQXMy+Y6DVUIh14e3Jd8pN5eP45hfgEb7OPO OrD3zU9qDLSYg== To: gentoo-dev@lists.gentoo.org Cc: "Marty E. Plummer" Subject: [gentoo-dev] [PATCH 2/4] gnome2-utils.eclass: make EAPI 7 ready Date: Wed, 20 Jun 2018 02:10:51 -0500 Message-Id: <20180620071053.11589-2-hanetzer@startmail.com> In-Reply-To: <20180620071053.11589-1-hanetzer@startmail.com> References: <20180620071053.11589-1-hanetzer@startmail.com> 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 X-Archives-Salt: 6e883018-9ddd-461d-998d-dd642d153341 X-Archives-Hash: 421c10abdd3e99a38aed568d38f3ece8 Use ${EROOT%/} whereever possible, as most of the directories and files used in conjunction with it have a leading /; add missing leading / where apropriate. Package-Manager: Portage-2.3.40, Repoman-2.3.9 --- eclass/gnome2-utils.eclass | 41 ++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 22 deletions(-) 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 case "${EAPI:-0}" in - 0|1|2|3|4|5|6) ;; + 0|1|2|3|4|5|6|7) ;; *) die "EAPI=${EAPI} is not supported" ;; esac @@ -82,9 +82,6 @@ esac # @DESCRIPTION: # List of gdk-pixbuf loaders provided by the package -DEPEND=">=sys-apps/sed-4" - - # @FUNCTION: gnome2_environment_reset # @DESCRIPTION: # Reset various variables inherited from root's evironment to a reasonable @@ -101,7 +98,7 @@ gnome2_environment_reset() { # Ensure we don't rely on dconf/gconf while building, bug #511946 export GSETTINGS_BACKEND="memory" - 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="$(type -P true)" @@ -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="${ROOT}" - local updater="${EROOT}${GCONFTOOL_BIN}" + local updater="${EROOT%/}${GCONFTOOL_BIN}" if [[ ! -x "${updater}" ]]; then debug-print "${updater} is not executable" @@ -149,9 +146,9 @@ gnome2_gconf_install() { 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 @@ -170,7 +167,7 @@ gnome2_gconf_install() { # database. gnome2_gconf_uninstall() { has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}" - local updater="${EROOT}${GCONFTOOL_BIN}" + local updater="${EROOT%/}${GCONFTOOL_BIN}" if [[ ! -x "${updater}" ]]; then debug-print "${updater} is not executable" @@ -189,9 +186,9 @@ gnome2_gconf_uninstall() { 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 @@ -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="${ROOT}" - local updater="${EROOT}${GTK_UPDATE_ICON_CACHE}" + local updater="${EROOT%/}${GTK_UPDATE_ICON_CACHE}" 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="${ROOT}" - local updater="${EROOT}${SCROLLKEEPER_UPDATE_BIN}" + local updater="${EROOT%/}${SCROLLKEEPER_UPDATE_BIN}" if [[ ! -x "${updater}" ]] ; then debug-print "${updater} is not executable" @@ -352,7 +349,7 @@ gnome2_scrollkeeper_update() { fi ebegin "Updating scrollkeeper database ..." - "${updater}" -q -p "${EROOT}${SCROLLKEEPER_DIR}" + "${updater}" -q -p "${EROOT%/}${SCROLLKEEPER_DIR}" eend $? } @@ -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="${ROOT}" - local updater="${EROOT}${GLIB_COMPILE_SCHEMAS}" + local updater="${EROOT%/}${GLIB_COMPILE_SCHEMAS}" 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="${ROOT}" - local updater="${EROOT}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders" + local updater="${EROOT%/}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders" if [[ ! -x ${updater} ]]; then - updater="${EROOT}/usr/bin/gdk-pixbuf-query-loaders" + updater="${EROOT%/}/usr/bin/gdk-pixbuf-query-loaders" fi if [[ ! -x ${updater} ]]; then @@ -427,7 +424,7 @@ gnome2_gdk_pixbuf_update() { local tmp_file=$(emktemp) ${updater} 1> "${tmp_file}" && chmod 0644 "${tmp_file}" && - cp -f "${tmp_file}" "${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.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 support eend $? } @@ -441,7 +438,7 @@ gnome2_query_immodules_gtk2() { [[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-2.0 ebegin "Updating gtk2 input method module cache" - GTK_IM_MODULE_FILE="${EROOT}usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \ + GTK_IM_MODULE_FILE="${EROOT%/}/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \ "${updater}" --update-cache eend $? } @@ -455,7 +452,7 @@ gnome2_query_immodules_gtk3() { [[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-3.0 ebegin "Updating gtk3 input method module cache" - GTK_IM_MODULE_FILE="${EROOT}usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" \ + GTK_IM_MODULE_FILE="${EROOT%/}/usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.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="${ROOT}" - local updater="${EROOT}/usr/bin/${CHOST}-gio-querymodules" + local updater="${EROOT%/}/usr/bin/${CHOST}-gio-querymodules" if [[ ! -x ${updater} ]]; then - updater="${EROOT}/usr/bin/gio-querymodules" + updater="${EROOT%/}/usr/bin/gio-querymodules" fi if [[ ! -x ${updater} ]]; then -- 2.17.1