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