1 |
Use ${EROOT%/} whereever possible, as most of the directories and files |
2 |
used in conjunction with it have a leading /; add missing leading / |
3 |
where apropriate. |
4 |
|
5 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
6 |
--- |
7 |
eclass/gnome2-utils.eclass | 41 ++++++++++++++++++-------------------- |
8 |
1 file changed, 19 insertions(+), 22 deletions(-) |
9 |
|
10 |
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass |
11 |
index 65076ae2d61..14fb9e7420c 100644 |
12 |
--- a/eclass/gnome2-utils.eclass |
13 |
+++ b/eclass/gnome2-utils.eclass |
14 |
@@ -18,7 +18,7 @@ |
15 |
inherit eutils xdg-utils |
16 |
|
17 |
case "${EAPI:-0}" in |
18 |
- 0|1|2|3|4|5|6) ;; |
19 |
+ 0|1|2|3|4|5|6|7) ;; |
20 |
*) die "EAPI=${EAPI} is not supported" ;; |
21 |
esac |
22 |
|
23 |
@@ -82,9 +82,6 @@ esac |
24 |
# @DESCRIPTION: |
25 |
# List of gdk-pixbuf loaders provided by the package |
26 |
|
27 |
-DEPEND=">=sys-apps/sed-4" |
28 |
- |
29 |
- |
30 |
# @FUNCTION: gnome2_environment_reset |
31 |
# @DESCRIPTION: |
32 |
# Reset various variables inherited from root's evironment to a reasonable |
33 |
@@ -101,7 +98,7 @@ gnome2_environment_reset() { |
34 |
# Ensure we don't rely on dconf/gconf while building, bug #511946 |
35 |
export GSETTINGS_BACKEND="memory" |
36 |
|
37 |
- if has ${EAPI:-0} 6; then |
38 |
+ if has ${EAPI:-0} 6 7; then |
39 |
# Try to cover the packages honoring this variable, bug #508124 |
40 |
export GST_INSPECT="$(type -P true)" |
41 |
|
42 |
@@ -129,7 +126,7 @@ gnome2_gconf_savelist() { |
43 |
# This function should be called from pkg_postinst. |
44 |
gnome2_gconf_install() { |
45 |
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}" |
46 |
- local updater="${EROOT}${GCONFTOOL_BIN}" |
47 |
+ local updater="${EROOT%/}${GCONFTOOL_BIN}" |
48 |
|
49 |
if [[ ! -x "${updater}" ]]; then |
50 |
debug-print "${updater} is not executable" |
51 |
@@ -149,9 +146,9 @@ gnome2_gconf_install() { |
52 |
|
53 |
local F |
54 |
for F in ${GNOME2_ECLASS_SCHEMAS}; do |
55 |
- if [[ -e "${EROOT}${F}" ]]; then |
56 |
+ if [[ -e "${EROOT%/}${F}" ]]; then |
57 |
debug-print "Installing schema: ${F}" |
58 |
- "${updater}" --makefile-install-rule "${EROOT}${F}" 1>/dev/null |
59 |
+ "${updater}" --makefile-install-rule "${EROOT%/}${F}" 1>/dev/null |
60 |
fi |
61 |
done |
62 |
|
63 |
@@ -170,7 +167,7 @@ gnome2_gconf_install() { |
64 |
# database. |
65 |
gnome2_gconf_uninstall() { |
66 |
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}" |
67 |
- local updater="${EROOT}${GCONFTOOL_BIN}" |
68 |
+ local updater="${EROOT%/}${GCONFTOOL_BIN}" |
69 |
|
70 |
if [[ ! -x "${updater}" ]]; then |
71 |
debug-print "${updater} is not executable" |
72 |
@@ -189,9 +186,9 @@ gnome2_gconf_uninstall() { |
73 |
|
74 |
local F |
75 |
for F in ${GNOME2_ECLASS_SCHEMAS}; do |
76 |
- if [[ -e "${EROOT}${F}" ]]; then |
77 |
+ if [[ -e "${EROOT%/}${F}" ]]; then |
78 |
debug-print "Uninstalling gconf schema: ${F}" |
79 |
- "${updater}" --makefile-uninstall-rule "${EROOT}${F}" 1>/dev/null |
80 |
+ "${updater}" --makefile-uninstall-rule "${EROOT%/}${F}" 1>/dev/null |
81 |
fi |
82 |
done |
83 |
|
84 |
@@ -224,7 +221,7 @@ gnome2_icon_savelist() { |
85 |
# This function should be called from pkg_postinst and pkg_postrm. |
86 |
gnome2_icon_cache_update() { |
87 |
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}" |
88 |
- local updater="${EROOT}${GTK_UPDATE_ICON_CACHE}" |
89 |
+ local updater="${EROOT%/}${GTK_UPDATE_ICON_CACHE}" |
90 |
|
91 |
if [[ ! -x "${updater}" ]] ; then |
92 |
debug-print "${updater} is not executable" |
93 |
@@ -339,7 +336,7 @@ gnome2_scrollkeeper_savelist() { |
94 |
# This function should be called from pkg_postinst and pkg_postrm. |
95 |
gnome2_scrollkeeper_update() { |
96 |
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}" |
97 |
- local updater="${EROOT}${SCROLLKEEPER_UPDATE_BIN}" |
98 |
+ local updater="${EROOT%/}${SCROLLKEEPER_UPDATE_BIN}" |
99 |
|
100 |
if [[ ! -x "${updater}" ]] ; then |
101 |
debug-print "${updater} is not executable" |
102 |
@@ -352,7 +349,7 @@ gnome2_scrollkeeper_update() { |
103 |
fi |
104 |
|
105 |
ebegin "Updating scrollkeeper database ..." |
106 |
- "${updater}" -q -p "${EROOT}${SCROLLKEEPER_DIR}" |
107 |
+ "${updater}" -q -p "${EROOT%/}${SCROLLKEEPER_DIR}" |
108 |
eend $? |
109 |
} |
110 |
|
111 |
@@ -376,7 +373,7 @@ gnome2_schemas_savelist() { |
112 |
# This function should be called from pkg_postinst and pkg_postrm. |
113 |
gnome2_schemas_update() { |
114 |
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}" |
115 |
- local updater="${EROOT}${GLIB_COMPILE_SCHEMAS}" |
116 |
+ local updater="${EROOT%/}${GLIB_COMPILE_SCHEMAS}" |
117 |
|
118 |
if [[ ! -x ${updater} ]]; then |
119 |
debug-print "${updater} is not executable" |
120 |
@@ -407,10 +404,10 @@ gnome2_gdk_pixbuf_savelist() { |
121 |
# This function should be called from pkg_postinst and pkg_postrm. |
122 |
gnome2_gdk_pixbuf_update() { |
123 |
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}" |
124 |
- local updater="${EROOT}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders" |
125 |
+ local updater="${EROOT%/}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders" |
126 |
|
127 |
if [[ ! -x ${updater} ]]; then |
128 |
- updater="${EROOT}/usr/bin/gdk-pixbuf-query-loaders" |
129 |
+ updater="${EROOT%/}/usr/bin/gdk-pixbuf-query-loaders" |
130 |
fi |
131 |
|
132 |
if [[ ! -x ${updater} ]]; then |
133 |
@@ -427,7 +424,7 @@ gnome2_gdk_pixbuf_update() { |
134 |
local tmp_file=$(emktemp) |
135 |
${updater} 1> "${tmp_file}" && |
136 |
chmod 0644 "${tmp_file}" && |
137 |
- cp -f "${tmp_file}" "${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" && |
138 |
+ cp -f "${tmp_file}" "${EROOT%/}/usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" && |
139 |
rm "${tmp_file}" # don't replace this with mv, required for SELinux support |
140 |
eend $? |
141 |
} |
142 |
@@ -441,7 +438,7 @@ gnome2_query_immodules_gtk2() { |
143 |
[[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-2.0 |
144 |
|
145 |
ebegin "Updating gtk2 input method module cache" |
146 |
- GTK_IM_MODULE_FILE="${EROOT}usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \ |
147 |
+ GTK_IM_MODULE_FILE="${EROOT%/}/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \ |
148 |
"${updater}" --update-cache |
149 |
eend $? |
150 |
} |
151 |
@@ -455,7 +452,7 @@ gnome2_query_immodules_gtk3() { |
152 |
[[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-3.0 |
153 |
|
154 |
ebegin "Updating gtk3 input method module cache" |
155 |
- GTK_IM_MODULE_FILE="${EROOT}usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" \ |
156 |
+ GTK_IM_MODULE_FILE="${EROOT%/}/usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" \ |
157 |
"${updater}" --update-cache |
158 |
eend $? |
159 |
} |
160 |
@@ -467,10 +464,10 @@ gnome2_query_immodules_gtk3() { |
161 |
# This function should be called from pkg_postinst and pkg_postrm. |
162 |
gnome2_giomodule_cache_update() { |
163 |
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}" |
164 |
- local updater="${EROOT}/usr/bin/${CHOST}-gio-querymodules" |
165 |
+ local updater="${EROOT%/}/usr/bin/${CHOST}-gio-querymodules" |
166 |
|
167 |
if [[ ! -x ${updater} ]]; then |
168 |
- updater="${EROOT}/usr/bin/gio-querymodules" |
169 |
+ updater="${EROOT%/}/usr/bin/gio-querymodules" |
170 |
fi |
171 |
|
172 |
if [[ ! -x ${updater} ]]; then |
173 |
-- |
174 |
2.17.1 |