Gentoo Archives: gentoo-dev

From: "Marty E. Plummer" <hanetzer@×××××××××.com>
To: Jason Zaman <perfinion@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready
Date: Wed, 20 Jun 2018 22:22:18
Message-Id: 20180620222108.qkxgody4hva5j5f3@proprietary-killer
In Reply to: Re: [gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready by Jason Zaman
1 On Wed, Jun 20, 2018 at 09:03:44PM +0800, Jason Zaman wrote:
2 > On Wed, Jun 20, 2018 at 02:10:50AM -0500, Marty E. Plummer wrote:
3 > > Use ${EROOT%/} whereever possible, as the tools and directories which
4 > > are used with it are already prefixed with a /
5 > >
6 > > Package-Manager: Portage-2.3.40, Repoman-2.3.9
7 > > ---
8 > > eclass/xdg-utils.eclass | 10 +++++-----
9 > > 1 file changed, 5 insertions(+), 5 deletions(-)
10 > >
11 > > diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass
12 > > index ac075185d8e..8dba5ed6861 100644
13 > > --- a/eclass/xdg-utils.eclass
14 > > +++ b/eclass/xdg-utils.eclass
15 > > @@ -15,7 +15,7 @@
16 > > # * XDG mime information database management
17 > >
18 > > case "${EAPI:-0}" in
19 > > - 0|1|2|3|4|5|6) ;;
20 > > + 0|1|2|3|4|5|6|7) ;;
21 > > *) die "EAPI=${EAPI} is not supported" ;;
22 > > esac
23 > >
24 > > @@ -66,7 +66,7 @@ xdg_environment_reset() {
25 > > # Updates the .desktop files database.
26 > > # Generates a list of mimetypes linked to applications that can handle them
27 > > xdg_desktop_database_update() {
28 > > - local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}"
29 > > + local updater="${EROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}"
30 >
31 > Shouldn't things like this be $BROOT since they're being run? $EROOT
32 > might be a different architecture that may or may not run at all on the
33 > build machine.
34 >
35 Good point, but here's a question; if EROOT=${ROOT%/}${EPREFIX}, how do
36 we use BROOT here? EBROOT? Or longhand ${BROOT%/}${EPREFIX} ? I think
37 that may be a use case that got missed in the EAPI 7 discussions.
38 > -- Jason
39 >
40 > > if [[ ${EBUILD_PHASE} != post* ]] ; then
41 > > die "xdg_desktop_database_update must be used in pkg_post* phases."
42 > > @@ -78,7 +78,7 @@ xdg_desktop_database_update() {
43 > > fi
44 > >
45 > > ebegin "Updating .desktop files database"
46 > > - "${updater}" -q "${EROOT}${DESKTOP_DATABASE_DIR}"
47 > > + "${updater}" -q "${EROOT%/}${DESKTOP_DATABASE_DIR}"
48 > > eend $?
49 > > }
50 > >
51 > > @@ -87,7 +87,7 @@ xdg_desktop_database_update() {
52 > > # Update the mime database.
53 > > # Creates a general list of mime types from several sources
54 > > xdg_mimeinfo_database_update() {
55 > > - local updater="${EROOT}${MIMEINFO_DATABASE_UPDATE_BIN}"
56 > > + local updater="${EROOT%/}${MIMEINFO_DATABASE_UPDATE_BIN}"
57 > >
58 > > if [[ ${EBUILD_PHASE} != post* ]] ; then
59 > > die "xdg_mimeinfo_database_update must be used in pkg_post* phases."
60 > > @@ -99,6 +99,6 @@ xdg_mimeinfo_database_update() {
61 > > fi
62 > >
63 > > ebegin "Updating shared mime info database"
64 > > - "${updater}" "${EROOT}${MIMEINFO_DATABASE_DIR}"
65 > > + "${updater}" "${EROOT%/}${MIMEINFO_DATABASE_DIR}"
66 > > eend $?
67 > > }
68 > > --
69 > > 2.17.1
70 > >
71 > >

Replies

Subject Author
Re: [gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready James Le Cuirot <chewi@g.o>