Gentoo Archives: gentoo-dev

From: Matt Turner <mattst88@g.o>
To: gentoo-dev@l.g.o
Cc: Arfrever Frehtes Taifersar Arahesis <Arfrever@××××××.Org>
Subject: [gentoo-dev] [PATCH 1/3] gnome2-utils.eclass: Fix double "/" with EAPI < 7.
Date: Tue, 31 Mar 2020 20:06:19
Message-Id: 20200331200610.3291197-1-mattst88@gentoo.org
1 From: Arfrever Frehtes Taifersar Arahesis <Arfrever@××××××.Org>
2
3 Bug: https://bugs.gentoo.org/694012
4 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@××××××.Org>
5 ---
6 eclass/gnome2-utils.eclass | 20 ++++++++++----------
7 1 file changed, 10 insertions(+), 10 deletions(-)
8
9 diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
10 index 06683a7467f..e808549272d 100644
11 --- a/eclass/gnome2-utils.eclass
12 +++ b/eclass/gnome2-utils.eclass
13 @@ -1,4 +1,4 @@
14 -# Copyright 1999-2019 Gentoo Authors
15 +# Copyright 1999-2020 Gentoo Authors
16 # Distributed under the terms of the GNU General Public License v2
17
18 # @ECLASS: gnome2-utils.eclass
19 @@ -122,7 +122,7 @@ gnome2_gconf_savelist() {
20 # This function should be called from pkg_postinst.
21 gnome2_gconf_install() {
22 has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
23 - local updater="${EROOT}${GCONFTOOL_BIN}"
24 + local updater="${EROOT%/}${GCONFTOOL_BIN}"
25
26 if [[ ! -x "${updater}" ]]; then
27 debug-print "${updater} is not executable"
28 @@ -163,7 +163,7 @@ gnome2_gconf_install() {
29 # database.
30 gnome2_gconf_uninstall() {
31 has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
32 - local updater="${EROOT}${GCONFTOOL_BIN}"
33 + local updater="${EROOT%/}${GCONFTOOL_BIN}"
34
35 if [[ ! -x "${updater}" ]]; then
36 debug-print "${updater} is not executable"
37 @@ -266,7 +266,7 @@ gnome2_scrollkeeper_savelist() {
38 # This function should be called from pkg_postinst and pkg_postrm.
39 gnome2_scrollkeeper_update() {
40 has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
41 - local updater="${EROOT}${SCROLLKEEPER_UPDATE_BIN}"
42 + local updater="${EROOT%/}${SCROLLKEEPER_UPDATE_BIN}"
43
44 if [[ ! -x "${updater}" ]] ; then
45 debug-print "${updater} is not executable"
46 @@ -279,7 +279,7 @@ gnome2_scrollkeeper_update() {
47 fi
48
49 ebegin "Updating scrollkeeper database ..."
50 - "${updater}" -q -p "${EROOT}${SCROLLKEEPER_DIR}"
51 + "${updater}" -q -p "${EROOT%/}${SCROLLKEEPER_DIR}"
52 eend $?
53 }
54
55 @@ -303,7 +303,7 @@ gnome2_schemas_savelist() {
56 # This function should be called from pkg_postinst and pkg_postrm.
57 gnome2_schemas_update() {
58 has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
59 - local updater="${EROOT}${GLIB_COMPILE_SCHEMAS}"
60 + local updater="${EROOT%/}${GLIB_COMPILE_SCHEMAS}"
61
62 if [[ ! -x ${updater} ]]; then
63 debug-print "${updater} is not executable"
64 @@ -334,10 +334,10 @@ gnome2_gdk_pixbuf_savelist() {
65 # This function should be called from pkg_postinst and pkg_postrm.
66 gnome2_gdk_pixbuf_update() {
67 has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
68 - local updater="${EROOT}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders"
69 + local updater="${EROOT%/}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders"
70
71 if [[ ! -x ${updater} ]]; then
72 - updater="${EROOT}/usr/bin/gdk-pixbuf-query-loaders"
73 + updater="${EROOT%/}/usr/bin/gdk-pixbuf-query-loaders"
74 fi
75
76 if [[ ! -x ${updater} ]]; then
77 @@ -394,10 +394,10 @@ gnome2_query_immodules_gtk3() {
78 # This function should be called from pkg_postinst and pkg_postrm.
79 gnome2_giomodule_cache_update() {
80 has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
81 - local updater="${EROOT}/usr/bin/${CHOST}-gio-querymodules"
82 + local updater="${EROOT%/}/usr/bin/${CHOST}-gio-querymodules"
83
84 if [[ ! -x ${updater} ]]; then
85 - updater="${EROOT}/usr/bin/gio-querymodules"
86 + updater="${EROOT%/}/usr/bin/gio-querymodules"
87 fi
88
89 if [[ ! -x ${updater} ]]; then
90 --
91 2.24.1

Replies