Gentoo Archives: gentoo-dev

From: "Marty E. Plummer" <hanetzer@×××××××××.com>
To: gentoo-dev@l.g.o
Cc: "Marty E. Plummer" <hanetzer@×××××××××.com>
Subject: [gentoo-dev] [PATCH 2/2] xdg-utils.eclass: make EAPI 7 ready
Date: Mon, 18 Jun 2018 00:48:56
Message-Id: 20180618004726.21235-2-hanetzer@startmail.com
In Reply to: [gentoo-dev] [PATCH 0/2] xdg-utils && gnome2-utils EAPI 7 work by "Marty E. Plummer"
1 Use ${EROOT%/} whereever possible, as the tools and directories which
2 are used with it are already prefixed with a /
3
4 Signed-off-by: Marty E. Plummer <hanetzer@×××××××××.com>
5 Package-Manager: Portage-2.3.40, Repoman-2.3.9
6 ---
7 eclass/xdg-utils.eclass | 10 +++++-----
8 1 file changed, 5 insertions(+), 5 deletions(-)
9
10 diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass
11 index ac075185d8e..8dba5ed6861 100644
12 --- a/eclass/xdg-utils.eclass
13 +++ b/eclass/xdg-utils.eclass
14 @@ -15,7 +15,7 @@
15 # * XDG mime information database management
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 @@ -66,7 +66,7 @@ xdg_environment_reset() {
24 # Updates the .desktop files database.
25 # Generates a list of mimetypes linked to applications that can handle them
26 xdg_desktop_database_update() {
27 - local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}"
28 + local updater="${EROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}"
29
30 if [[ ${EBUILD_PHASE} != post* ]] ; then
31 die "xdg_desktop_database_update must be used in pkg_post* phases."
32 @@ -78,7 +78,7 @@ xdg_desktop_database_update() {
33 fi
34
35 ebegin "Updating .desktop files database"
36 - "${updater}" -q "${EROOT}${DESKTOP_DATABASE_DIR}"
37 + "${updater}" -q "${EROOT%/}${DESKTOP_DATABASE_DIR}"
38 eend $?
39 }
40
41 @@ -87,7 +87,7 @@ xdg_desktop_database_update() {
42 # Update the mime database.
43 # Creates a general list of mime types from several sources
44 xdg_mimeinfo_database_update() {
45 - local updater="${EROOT}${MIMEINFO_DATABASE_UPDATE_BIN}"
46 + local updater="${EROOT%/}${MIMEINFO_DATABASE_UPDATE_BIN}"
47
48 if [[ ${EBUILD_PHASE} != post* ]] ; then
49 die "xdg_mimeinfo_database_update must be used in pkg_post* phases."
50 @@ -99,6 +99,6 @@ xdg_mimeinfo_database_update() {
51 fi
52
53 ebegin "Updating shared mime info database"
54 - "${updater}" "${EROOT}${MIMEINFO_DATABASE_DIR}"
55 + "${updater}" "${EROOT%/}${MIMEINFO_DATABASE_DIR}"
56 eend $?
57 }
58 --
59 2.17.1