1 |
Use ${EROOT%/} whereever possible, as the tools and directories which |
2 |
are used with it are already prefixed with a / |
3 |
Use BROOT to specify path to update-mime-database and friends, setting |
4 |
that to EROOT when not EAPI 7 |
5 |
|
6 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
7 |
--- |
8 |
eclass/xdg-utils.eclass | 14 ++++++++------ |
9 |
1 file changed, 8 insertions(+), 6 deletions(-) |
10 |
|
11 |
diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass |
12 |
index f9088d9c348..43c981251d9 100644 |
13 |
--- a/eclass/xdg-utils.eclass |
14 |
+++ b/eclass/xdg-utils.eclass |
15 |
@@ -72,7 +72,8 @@ xdg_environment_reset() { |
16 |
# Updates the .desktop files database. |
17 |
# Generates a list of mimetypes linked to applications that can handle them |
18 |
xdg_desktop_database_update() { |
19 |
- local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}" |
20 |
+ has ${EAPI:-0} 7 || BROOT=${EROOT} |
21 |
+ local updater="${BROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}" |
22 |
|
23 |
if [[ ${EBUILD_PHASE} != post* ]] ; then |
24 |
die "xdg_desktop_database_update must be used in pkg_post* phases." |
25 |
@@ -84,7 +85,7 @@ xdg_desktop_database_update() { |
26 |
fi |
27 |
|
28 |
ebegin "Updating .desktop files database" |
29 |
- "${updater}" -q "${EROOT}${DESKTOP_DATABASE_DIR}" |
30 |
+ "${updater}" -q "${EROOT%/}${DESKTOP_DATABASE_DIR}" |
31 |
eend $? |
32 |
} |
33 |
|
34 |
@@ -93,8 +94,8 @@ xdg_desktop_database_update() { |
35 |
# Updates Gtk+ icon cache files under /usr/share/icons. |
36 |
# This function should be called from pkg_postinst and pkg_postrm. |
37 |
xdg_icon_cache_update() { |
38 |
- has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}" |
39 |
- local updater="${EROOT%/}${GTK_UPDATE_ICON_CACHE}" |
40 |
+ has ${EAPI:-0} 7 || BROOT=${EROOT} |
41 |
+ local updater="${BROOT%/}${GTK_UPDATE_ICON_CACHE}" |
42 |
|
43 |
if [[ ! -x "${updater}" ]]; then |
44 |
debug-print "${updater} is not executable" |
45 |
@@ -145,7 +146,8 @@ xdg_icon_cache_update() { |
46 |
# Update the mime database. |
47 |
# Creates a general list of mime types from several sources |
48 |
xdg_mimeinfo_database_update() { |
49 |
- local updater="${EROOT}${MIMEINFO_DATABASE_UPDATE_BIN}" |
50 |
+ has ${EAPI:-0} 7 || BROOT=${EROOT} |
51 |
+ local updater="${BROOT%/}${MIMEINFO_DATABASE_UPDATE_BIN}" |
52 |
|
53 |
if [[ ${EBUILD_PHASE} != post* ]] ; then |
54 |
die "xdg_mimeinfo_database_update must be used in pkg_post* phases." |
55 |
@@ -157,6 +159,6 @@ xdg_mimeinfo_database_update() { |
56 |
fi |
57 |
|
58 |
ebegin "Updating shared mime info database" |
59 |
- "${updater}" "${EROOT}${MIMEINFO_DATABASE_DIR}" |
60 |
+ "${updater}" "${EROOT%/}${MIMEINFO_DATABASE_DIR}" |
61 |
eend $? |
62 |
} |
63 |
-- |
64 |
2.17.1 |