On Tue, 2018-10-02 at 22:16 -0400, Mike Gilbert wrote:
> Avoid calling binaries that may have been compiled against different
> libraries or even cross-compiled for an incomatible arch.
> 
> Instead, always call the binaries installed in BROOT (/), if available.

Except BROOT doesn't have to be / (that's why we made it into
a variable)!  Also, wouldn't it be sufficient to use PATH lookup here
and let the PM handle providing the correct root?

> 
> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> ---
>  eclass/xdg-utils.eclass | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass
> index fe1eef213ea4..b133de093082 100644
> --- a/eclass/xdg-utils.eclass
> +++ b/eclass/xdg-utils.eclass
> @@ -67,7 +67,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="${EPREFIX}${DESKTOP_DATABASE_UPDATE_BIN}"
>  
>  	if [[ ${EBUILD_PHASE} != post* ]] ; then
>  		die "xdg_desktop_database_update must be used in pkg_post* phases."
> @@ -88,7 +88,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="${EPREFIX}${MIMEINFO_DATABASE_UPDATE_BIN}"
>  
>  	if [[ ${EBUILD_PHASE} != post* ]] ; then
>  		die "xdg_mimeinfo_database_update must be used in pkg_post* phases."

-- 
Best regards,
Michał Górny