Re: [gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready
On Wed, 20 Jun 2018 22:09:21 -0500 "Marty E. Plummer" wrote: > On Thu, Jun 21, 2018 at 03:41:02AM +0100, M. J. Everitt wrote: > > On 21/06/18 03:38, Jason Zaman wrote: > > > On Wed, Jun 20, 2018 at 06:01:10PM -0500, Marty E. Plummer > > > wrote: > > >> On Wed, Jun 20, 2018 at 11:33:53PM +0100, James Le Cuirot > > >> wrote: > > >>> On Wed, 20 Jun 2018 17:21:09 -0500 > > >>> "Marty E. Plummer" wrote: > > >>> > > On Wed, Jun 20, 2018 at 09:03:44PM +0800, Jason Zaman wrote: > > > On Wed, Jun 20, 2018 at 02:10:50AM -0500, Marty E. Plummer > > > wrote: > > >> Use ${EROOT%/} whereever possible, as the tools and > > >> directories which are used with it are already prefixed with > > >> a / > > >> > > >> Package-Manager: Portage-2.3.40, Repoman-2.3.9 > > >> --- > > >> eclass/xdg-utils.eclass | 10 +- > > >> 1 file changed, 5 insertions(+), 5 deletions(-) > > >> > > >> diff --git a/eclass/xdg-utils.eclass > > >> b/eclass/xdg-utils.eclass index ac075185d8e..8dba5ed6861 > > >> 100644 --- a/eclass/xdg-utils.eclass > > >> +++ b/eclass/xdg-utils.eclass > > >> @@ -66,7 +66,7 @@ xdg_environment_reset() { > > >> # Updates the .desktop files database. > > >> # Generates a list of mimetypes linked to applications that > > >> can handle them xdg_desktop_database_update() { > > >> -local > > >> updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}" > > >> +local > > >> updater="${EROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}" > > > Shouldn't things like this be $BROOT since they're being run? > > > $EROOT might be a different architecture that may or may not > > > run at all on the build machine. > > > > > Good point, but here's a question; if > > EROOT=${ROOT%/}${EPREFIX}, how do we use BROOT here? EBROOT? > > Or longhand ${BROOT%/}${EPREFIX} ? I think that may be a use > > case that got missed in the EAPI 7 discussions. > > >>> BROOT is already prefixed as BROOT without a prefix would just > > >>> be /. > > >> I don't follow. Its my understanding that BROOT ~= ROOT for most > > >> situations. But consider this setup: > > >> Ubuntu amd64 with Gentoo Prefix, emerging a native arm @system to > > >> /mnt/arm EPREFIX = /home/user/gentoo. > > >> > > >> In this situation, ROOT=/mnt/arm, EROOT=/mnt/arm, but what is > > >> BROOT? /, or /home/usr/gentoo? > > > https://dev.gentoo.org/~mgorny/articles/the-ultimate-guide-to-eapi-7.html#broot-variable-for-bdepend > > > > > > Basically BROOT already contains EPREFIX or BPREFIX or whatever > > > it would be called. There is like no need for an un-prefixed > > > BROOT so its just merged in. so you should just need > > > "${BROOT}/usr/bin/update-mime-database" > > > > > Obligatory n00b question .. how does this work in EAPI <= 6 ?! :D > > > I would guess something like has eapi 7 || ROOT = BROOT or whatever. > Use BROOT by default and if the EAPI doesn't support it set ROOT to > BROOT or somat. There was no variable for BROOT before EAPI 7, that's why we created one! There was an internal Portage variable called PORTAGE_OVERRIDE_EPREFIX, which is basically what BROOT gets set to now but you should not use this in an eclass. I guess the safest fallback would be EPREFIX. This would be technically wrong for cross-prefix builds but unlikely to cause a problem in practise. Don't do ${BROOT-${EPREFIX}} though because BROOT is usually empty anyway. -- James Le Cuirot (chewi) Gentoo Linux Developer
Re: [gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready
On Thu, Jun 21, 2018 at 03:41:02AM +0100, M. J. Everitt wrote: > On 21/06/18 03:38, Jason Zaman wrote: > > On Wed, Jun 20, 2018 at 06:01:10PM -0500, Marty E. Plummer wrote: > >> On Wed, Jun 20, 2018 at 11:33:53PM +0100, James Le Cuirot wrote: > >>> On Wed, 20 Jun 2018 17:21:09 -0500 > >>> "Marty E. Plummer" wrote: > >>> > On Wed, Jun 20, 2018 at 09:03:44PM +0800, Jason Zaman wrote: > > On Wed, Jun 20, 2018 at 02:10:50AM -0500, Marty E. Plummer wrote: > >> Use ${EROOT%/} whereever possible, as the tools and directories which > >> are used with it are already prefixed with a / > >> > >> Package-Manager: Portage-2.3.40, Repoman-2.3.9 > >> --- > >> eclass/xdg-utils.eclass | 10 +- > >> 1 file changed, 5 insertions(+), 5 deletions(-) > >> > >> diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass > >> index ac075185d8e..8dba5ed6861 100644 > >> --- a/eclass/xdg-utils.eclass > >> +++ b/eclass/xdg-utils.eclass > >> @@ -66,7 +66,7 @@ xdg_environment_reset() { > >> # Updates the .desktop files database. > >> # Generates a list of mimetypes linked to applications that can > >> handle them > >> xdg_desktop_database_update() { > >> - local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}" > >> + local updater="${EROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}" > > Shouldn't things like this be $BROOT since they're being run? $EROOT > > might be a different architecture that may or may not run at all on the > > build machine. > > > Good point, but here's a question; if EROOT=${ROOT%/}${EPREFIX}, how do > we use BROOT here? EBROOT? Or longhand ${BROOT%/}${EPREFIX} ? I think > that may be a use case that got missed in the EAPI 7 discussions. > >>> BROOT is already prefixed as BROOT without a prefix would just be /. > >>> > >> I don't follow. Its my understanding that BROOT ~= ROOT for most > >> situations. But consider this setup: > >> Ubuntu amd64 with Gentoo Prefix, emerging a native arm @system to > >> /mnt/arm EPREFIX = /home/user/gentoo. > >> > >> In this situation, ROOT=/mnt/arm, EROOT=/mnt/arm, but what is BROOT? /, > >> or /home/usr/gentoo? > > https://dev.gentoo.org/~mgorny/articles/the-ultimate-guide-to-eapi-7.html#broot-variable-for-bdepend > > > > Basically BROOT already contains EPREFIX or BPREFIX or whatever it would > > be called. There is like no need for an un-prefixed BROOT so its just > > merged in. so you should just need "${BROOT}/usr/bin/update-mime-database" > > > > -- Jason > > > >>> -- > >>> James Le Cuirot (chewi) > >>> Gentoo Linux Developer > >> > >> > Obligatory n00b question .. how does this work in EAPI <= 6 ?! :D > I would guess something like has eapi 7 || ROOT = BROOT or whatever. Use BROOT by default and if the EAPI doesn't support it set ROOT to BROOT or somat.
Re: [gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready
On 21/06/18 03:38, Jason Zaman wrote: > On Wed, Jun 20, 2018 at 06:01:10PM -0500, Marty E. Plummer wrote: >> On Wed, Jun 20, 2018 at 11:33:53PM +0100, James Le Cuirot wrote: >>> On Wed, 20 Jun 2018 17:21:09 -0500 >>> "Marty E. Plummer" wrote: >>> On Wed, Jun 20, 2018 at 09:03:44PM +0800, Jason Zaman wrote: > On Wed, Jun 20, 2018 at 02:10:50AM -0500, Marty E. Plummer wrote: >> Use ${EROOT%/} whereever possible, as the tools and directories which >> are used with it are already prefixed with a / >> >> Package-Manager: Portage-2.3.40, Repoman-2.3.9 >> --- >> eclass/xdg-utils.eclass | 10 +- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass >> index ac075185d8e..8dba5ed6861 100644 >> --- a/eclass/xdg-utils.eclass >> +++ b/eclass/xdg-utils.eclass >> @@ -66,7 +66,7 @@ xdg_environment_reset() { >> # Updates the .desktop files database. >> # Generates a list of mimetypes linked to applications that can handle >> them >> xdg_desktop_database_update() { >> -local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}" >> +local updater="${EROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}" > Shouldn't things like this be $BROOT since they're being run? $EROOT > might be a different architecture that may or may not run at all on the > build machine. > Good point, but here's a question; if EROOT=${ROOT%/}${EPREFIX}, how do we use BROOT here? EBROOT? Or longhand ${BROOT%/}${EPREFIX} ? I think that may be a use case that got missed in the EAPI 7 discussions. >>> BROOT is already prefixed as BROOT without a prefix would just be /. >>> >> I don't follow. Its my understanding that BROOT ~= ROOT for most >> situations. But consider this setup: >> Ubuntu amd64 with Gentoo Prefix, emerging a native arm @system to >> /mnt/arm EPREFIX = /home/user/gentoo. >> >> In this situation, ROOT=/mnt/arm, EROOT=/mnt/arm, but what is BROOT? /, >> or /home/usr/gentoo? > https://dev.gentoo.org/~mgorny/articles/the-ultimate-guide-to-eapi-7.html#broot-variable-for-bdepend > > Basically BROOT already contains EPREFIX or BPREFIX or whatever it would > be called. There is like no need for an un-prefixed BROOT so its just > merged in. so you should just need "${BROOT}/usr/bin/update-mime-database" > > -- Jason > >>> -- >>> James Le Cuirot (chewi) >>> Gentoo Linux Developer >> >> Obligatory n00b question .. how does this work in EAPI <= 6 ?! :D signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready
On Wed, Jun 20, 2018 at 06:01:10PM -0500, Marty E. Plummer wrote: > On Wed, Jun 20, 2018 at 11:33:53PM +0100, James Le Cuirot wrote: > > On Wed, 20 Jun 2018 17:21:09 -0500 > > "Marty E. Plummer" wrote: > > > > > On Wed, Jun 20, 2018 at 09:03:44PM +0800, Jason Zaman wrote: > > > > On Wed, Jun 20, 2018 at 02:10:50AM -0500, Marty E. Plummer wrote: > > > > > Use ${EROOT%/} whereever possible, as the tools and directories which > > > > > are used with it are already prefixed with a / > > > > > > > > > > Package-Manager: Portage-2.3.40, Repoman-2.3.9 > > > > > --- > > > > > eclass/xdg-utils.eclass | 10 +- > > > > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > > > > > > > diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass > > > > > index ac075185d8e..8dba5ed6861 100644 > > > > > --- a/eclass/xdg-utils.eclass > > > > > +++ b/eclass/xdg-utils.eclass > > > > > @@ -66,7 +66,7 @@ xdg_environment_reset() { > > > > > # Updates the .desktop files database. > > > > > # Generates a list of mimetypes linked to applications that can > > > > > handle them > > > > > xdg_desktop_database_update() { > > > > > - local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}" > > > > > + local updater="${EROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}" > > > > > > > > Shouldn't things like this be $BROOT since they're being run? $EROOT > > > > might be a different architecture that may or may not run at all on the > > > > build machine. > > > > > > > Good point, but here's a question; if EROOT=${ROOT%/}${EPREFIX}, how do > > > we use BROOT here? EBROOT? Or longhand ${BROOT%/}${EPREFIX} ? I think > > > that may be a use case that got missed in the EAPI 7 discussions. > > > > BROOT is already prefixed as BROOT without a prefix would just be /. > > > I don't follow. Its my understanding that BROOT ~= ROOT for most > situations. But consider this setup: > Ubuntu amd64 with Gentoo Prefix, emerging a native arm @system to > /mnt/arm EPREFIX = /home/user/gentoo. > > In this situation, ROOT=/mnt/arm, EROOT=/mnt/arm, but what is BROOT? /, > or /home/usr/gentoo? https://dev.gentoo.org/~mgorny/articles/the-ultimate-guide-to-eapi-7.html#broot-variable-for-bdepend Basically BROOT already contains EPREFIX or BPREFIX or whatever it would be called. There is like no need for an un-prefixed BROOT so its just merged in. so you should just need "${BROOT}/usr/bin/update-mime-database" -- Jason > > -- > > James Le Cuirot (chewi) > > Gentoo Linux Developer > > >
Re: [gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready
On Wed, Jun 20, 2018 at 11:33:53PM +0100, James Le Cuirot wrote: > On Wed, 20 Jun 2018 17:21:09 -0500 > "Marty E. Plummer" wrote: > > > On Wed, Jun 20, 2018 at 09:03:44PM +0800, Jason Zaman wrote: > > > On Wed, Jun 20, 2018 at 02:10:50AM -0500, Marty E. Plummer wrote: > > > > Use ${EROOT%/} whereever possible, as the tools and directories which > > > > are used with it are already prefixed with a / > > > > > > > > Package-Manager: Portage-2.3.40, Repoman-2.3.9 > > > > --- > > > > eclass/xdg-utils.eclass | 10 +- > > > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > > > > > diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass > > > > index ac075185d8e..8dba5ed6861 100644 > > > > --- a/eclass/xdg-utils.eclass > > > > +++ b/eclass/xdg-utils.eclass > > > > @@ -66,7 +66,7 @@ xdg_environment_reset() { > > > > # Updates the .desktop files database. > > > > # Generates a list of mimetypes linked to applications that can handle > > > > them > > > > xdg_desktop_database_update() { > > > > - local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}" > > > > + local updater="${EROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}" > > > > > > Shouldn't things like this be $BROOT since they're being run? $EROOT > > > might be a different architecture that may or may not run at all on the > > > build machine. > > > > > Good point, but here's a question; if EROOT=${ROOT%/}${EPREFIX}, how do > > we use BROOT here? EBROOT? Or longhand ${BROOT%/}${EPREFIX} ? I think > > that may be a use case that got missed in the EAPI 7 discussions. > > BROOT is already prefixed as BROOT without a prefix would just be /. > I don't follow. Its my understanding that BROOT ~= ROOT for most situations. But consider this setup: Ubuntu amd64 with Gentoo Prefix, emerging a native arm @system to /mnt/arm EPREFIX = /home/user/gentoo. In this situation, ROOT=/mnt/arm, EROOT=/mnt/arm, but what is BROOT? /, or /home/usr/gentoo? > -- > James Le Cuirot (chewi) > Gentoo Linux Developer
Re: [gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready
On Wed, 20 Jun 2018 17:21:09 -0500 "Marty E. Plummer" wrote: > On Wed, Jun 20, 2018 at 09:03:44PM +0800, Jason Zaman wrote: > > On Wed, Jun 20, 2018 at 02:10:50AM -0500, Marty E. Plummer wrote: > > > Use ${EROOT%/} whereever possible, as the tools and directories which > > > are used with it are already prefixed with a / > > > > > > Package-Manager: Portage-2.3.40, Repoman-2.3.9 > > > --- > > > eclass/xdg-utils.eclass | 10 +- > > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > > > diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass > > > index ac075185d8e..8dba5ed6861 100644 > > > --- a/eclass/xdg-utils.eclass > > > +++ b/eclass/xdg-utils.eclass > > > @@ -66,7 +66,7 @@ xdg_environment_reset() { > > > # Updates the .desktop files database. > > > # Generates a list of mimetypes linked to applications that can handle > > > them > > > xdg_desktop_database_update() { > > > - local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}" > > > + local updater="${EROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}" > > > > Shouldn't things like this be $BROOT since they're being run? $EROOT > > might be a different architecture that may or may not run at all on the > > build machine. > > > Good point, but here's a question; if EROOT=${ROOT%/}${EPREFIX}, how do > we use BROOT here? EBROOT? Or longhand ${BROOT%/}${EPREFIX} ? I think > that may be a use case that got missed in the EAPI 7 discussions. BROOT is already prefixed as BROOT without a prefix would just be /. -- James Le Cuirot (chewi) Gentoo Linux Developer pgprmQy2bpUlk.pgp Description: OpenPGP digital signature
Re: [gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready
On Wed, Jun 20, 2018 at 09:03:44PM +0800, Jason Zaman wrote: > On Wed, Jun 20, 2018 at 02:10:50AM -0500, Marty E. Plummer wrote: > > Use ${EROOT%/} whereever possible, as the tools and directories which > > are used with it are already prefixed with a / > > > > Package-Manager: Portage-2.3.40, Repoman-2.3.9 > > --- > > eclass/xdg-utils.eclass | 10 +- > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass > > index ac075185d8e..8dba5ed6861 100644 > > --- a/eclass/xdg-utils.eclass > > +++ b/eclass/xdg-utils.eclass > > @@ -15,7 +15,7 @@ > > # * XDG mime information database management > > > > case "${EAPI:-0}" in > > - 0|1|2|3|4|5|6) ;; > > + 0|1|2|3|4|5|6|7) ;; > > *) die "EAPI=${EAPI} is not supported" ;; > > esac > > > > @@ -66,7 +66,7 @@ xdg_environment_reset() { > > # Updates the .desktop files database. > > # Generates a list of mimetypes linked to applications that can handle them > > xdg_desktop_database_update() { > > - local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}" > > + local updater="${EROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}" > > Shouldn't things like this be $BROOT since they're being run? $EROOT > might be a different architecture that may or may not run at all on the > build machine. > Good point, but here's a question; if EROOT=${ROOT%/}${EPREFIX}, how do we use BROOT here? EBROOT? Or longhand ${BROOT%/}${EPREFIX} ? I think that may be a use case that got missed in the EAPI 7 discussions. > -- Jason > > > if [[ ${EBUILD_PHASE} != post* ]] ; then > > die "xdg_desktop_database_update must be used in pkg_post* > > phases." > > @@ -78,7 +78,7 @@ xdg_desktop_database_update() { > > fi > > > > ebegin "Updating .desktop files database" > > - "${updater}" -q "${EROOT}${DESKTOP_DATABASE_DIR}" > > + "${updater}" -q "${EROOT%/}${DESKTOP_DATABASE_DIR}" > > eend $? > > } > > > > @@ -87,7 +87,7 @@ xdg_desktop_database_update() { > > # Update the mime database. > > # Creates a general list of mime types from several sources > > xdg_mimeinfo_database_update() { > > - local updater="${EROOT}${MIMEINFO_DATABASE_UPDATE_BIN}" > > + local updater="${EROOT%/}${MIMEINFO_DATABASE_UPDATE_BIN}" > > > > if [[ ${EBUILD_PHASE} != post* ]] ; then > > die "xdg_mimeinfo_database_update must be used in pkg_post* > > phases." > > @@ -99,6 +99,6 @@ xdg_mimeinfo_database_update() { > > fi > > > > ebegin "Updating shared mime info database" > > - "${updater}" "${EROOT}${MIMEINFO_DATABASE_DIR}" > > + "${updater}" "${EROOT%/}${MIMEINFO_DATABASE_DIR}" > > eend $? > > } > > -- > > 2.17.1 > > > >
Re: [gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready
On Wed, 20 Jun 2018 21:03:44 +0800 Jason Zaman wrote: > On Wed, Jun 20, 2018 at 02:10:50AM -0500, Marty E. Plummer wrote: > > Use ${EROOT%/} whereever possible, as the tools and directories which > > are used with it are already prefixed with a / > > > > Package-Manager: Portage-2.3.40, Repoman-2.3.9 > > --- > > eclass/xdg-utils.eclass | 10 +- > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass > > index ac075185d8e..8dba5ed6861 100644 > > --- a/eclass/xdg-utils.eclass > > +++ b/eclass/xdg-utils.eclass > > @@ -66,7 +66,7 @@ xdg_environment_reset() { > > # Updates the .desktop files database. > > # Generates a list of mimetypes linked to applications that can handle them > > xdg_desktop_database_update() { > > - local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}" > > + local updater="${EROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}" > > Shouldn't things like this be $BROOT since they're being run? $EROOT > might be a different architecture that may or may not run at all on the > build machine. +1 -- James Le Cuirot (chewi) Gentoo Linux Developer pgpMOcu2KzK3k.pgp Description: OpenPGP digital signature
Re: [gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready
On Wed, Jun 20, 2018 at 02:10:50AM -0500, Marty E. Plummer wrote: > Use ${EROOT%/} whereever possible, as the tools and directories which > are used with it are already prefixed with a / > > Package-Manager: Portage-2.3.40, Repoman-2.3.9 > --- > eclass/xdg-utils.eclass | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass > index ac075185d8e..8dba5ed6861 100644 > --- a/eclass/xdg-utils.eclass > +++ b/eclass/xdg-utils.eclass > @@ -15,7 +15,7 @@ > # * XDG mime information database management > > case "${EAPI:-0}" in > - 0|1|2|3|4|5|6) ;; > + 0|1|2|3|4|5|6|7) ;; > *) die "EAPI=${EAPI} is not supported" ;; > esac > > @@ -66,7 +66,7 @@ xdg_environment_reset() { > # Updates the .desktop files database. > # Generates a list of mimetypes linked to applications that can handle them > xdg_desktop_database_update() { > - local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}" > + local updater="${EROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}" Shouldn't things like this be $BROOT since they're being run? $EROOT might be a different architecture that may or may not run at all on the build machine. -- Jason > if [[ ${EBUILD_PHASE} != post* ]] ; then > die "xdg_desktop_database_update must be used in pkg_post* > phases." > @@ -78,7 +78,7 @@ xdg_desktop_database_update() { > fi > > ebegin "Updating .desktop files database" > - "${updater}" -q "${EROOT}${DESKTOP_DATABASE_DIR}" > + "${updater}" -q "${EROOT%/}${DESKTOP_DATABASE_DIR}" > eend $? > } > > @@ -87,7 +87,7 @@ xdg_desktop_database_update() { > # Update the mime database. > # Creates a general list of mime types from several sources > xdg_mimeinfo_database_update() { > - local updater="${EROOT}${MIMEINFO_DATABASE_UPDATE_BIN}" > + local updater="${EROOT%/}${MIMEINFO_DATABASE_UPDATE_BIN}" > > if [[ ${EBUILD_PHASE} != post* ]] ; then > die "xdg_mimeinfo_database_update must be used in pkg_post* > phases." > @@ -99,6 +99,6 @@ xdg_mimeinfo_database_update() { > fi > > ebegin "Updating shared mime info database" > - "${updater}" "${EROOT}${MIMEINFO_DATABASE_DIR}" > + "${updater}" "${EROOT%/}${MIMEINFO_DATABASE_DIR}" > eend $? > } > -- > 2.17.1 > >
[gentoo-dev] [PATCH 1/4] xdg-utils.eclass: make EAPI 7 ready
Use ${EROOT%/} whereever possible, as the tools and directories which are used with it are already prefixed with a / Package-Manager: Portage-2.3.40, Repoman-2.3.9 --- eclass/xdg-utils.eclass | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass index ac075185d8e..8dba5ed6861 100644 --- a/eclass/xdg-utils.eclass +++ b/eclass/xdg-utils.eclass @@ -15,7 +15,7 @@ # * XDG mime information database management case "${EAPI:-0}" in - 0|1|2|3|4|5|6) ;; + 0|1|2|3|4|5|6|7) ;; *) die "EAPI=${EAPI} is not supported" ;; esac @@ -66,7 +66,7 @@ xdg_environment_reset() { # Updates the .desktop files database. # Generates a list of mimetypes linked to applications that can handle them xdg_desktop_database_update() { - local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}" + local updater="${EROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}" if [[ ${EBUILD_PHASE} != post* ]] ; then die "xdg_desktop_database_update must be used in pkg_post* phases." @@ -78,7 +78,7 @@ xdg_desktop_database_update() { fi ebegin "Updating .desktop files database" - "${updater}" -q "${EROOT}${DESKTOP_DATABASE_DIR}" + "${updater}" -q "${EROOT%/}${DESKTOP_DATABASE_DIR}" eend $? } @@ -87,7 +87,7 @@ xdg_desktop_database_update() { # Update the mime database. # Creates a general list of mime types from several sources xdg_mimeinfo_database_update() { - local updater="${EROOT}${MIMEINFO_DATABASE_UPDATE_BIN}" + local updater="${EROOT%/}${MIMEINFO_DATABASE_UPDATE_BIN}" if [[ ${EBUILD_PHASE} != post* ]] ; then die "xdg_mimeinfo_database_update must be used in pkg_post* phases." @@ -99,6 +99,6 @@ xdg_mimeinfo_database_update() { fi ebegin "Updating shared mime info database" - "${updater}" "${EROOT}${MIMEINFO_DATABASE_DIR}" + "${updater}" "${EROOT%/}${MIMEINFO_DATABASE_DIR}" eend $? } -- 2.17.1