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

Replies

Subject Author
[gentoo-dev] [PATCH 2/4] gnome2-utils.eclass: make EAPI 7 ready "Marty E. Plummer" <hanetzer@×××××××××.com>
[gentoo-dev] [PATCH 3/4] gnome2-utils: move icon functions into xdg-utils "Marty E. Plummer" <hanetzer@×××××××××.com>
[gentoo-dev] [PATCH 4/4] gnome2.eclass: move icon handling code to xdg.eclass "Marty E. Plummer" <hanetzer@×××××××××.com>
Re: [gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready Jason Zaman <perfinion@g.o>