From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B50C5138334 for ; Wed, 3 Oct 2018 07:34:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1E622E09DD; Wed, 3 Oct 2018 07:34:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C4CCBE09D9 for ; Wed, 3 Oct 2018 07:33:59 +0000 (UTC) Received: from pomiot (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 96A5A335CFD; Wed, 3 Oct 2018 07:33:57 +0000 (UTC) Message-ID: <1538552033.1042.0.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH] xdg-utils.eclass: don't call binaries from ROOT From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: freedesktop-bugs@gentoo.org Date: Wed, 03 Oct 2018 09:33:53 +0200 In-Reply-To: <20181003021638.2475-1-floppym@gentoo.org> References: <20181003021638.2475-1-floppym@gentoo.org> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-25Of7Vall/9efjqcxGqu" X-Mailer: Evolution 3.26.6 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Archives-Salt: 2997e51c-f096-4d43-ae2c-077dfc465406 X-Archives-Hash: 3459f152c7fc07f1321c3173716a99cc --=-25Of7Vall/9efjqcxGqu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. >=20 > 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? >=20 > Signed-off-by: Mike Gilbert > --- > eclass/xdg-utils.eclass | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > 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 t= hem > xdg_desktop_database_update() { > - local updater=3D"${EROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}" > + local updater=3D"${EPREFIX}${DESKTOP_DATABASE_UPDATE_BIN}" > =20 > if [[ ${EBUILD_PHASE} !=3D 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=3D"${EROOT%/}${MIMEINFO_DATABASE_UPDATE_BIN}" > + local updater=3D"${EPREFIX}${MIMEINFO_DATABASE_UPDATE_BIN}" > =20 > if [[ ${EBUILD_PHASE} !=3D post* ]] ; then > die "xdg_mimeinfo_database_update must be used in pkg_post* phases." --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-25Of7Vall/9efjqcxGqu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEXr8g+Zb7PCLMb8pAur8dX/jIEQoFAlu0cOFfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDVF QkYyMEY5OTZGQjNDMjJDQzZGQ0E0MEJBQkYxRDVGRjhDODExMEEACgkQur8dX/jI EQrdAhAA1HUqegb8i88z3VILAgM1m/p2r85VjlNJfWnFN6Sp2BXza3x70BzS/R5x oFOAfmYtxmhaqgSjL4khdJFvo8L01HbZaj3dvlpeFWMq9IHZwU8WCeWGXmiSnQY+ yrNx4TuhApfT4N5xZ5+ZZUQi9uMn99NWxA1Q4Hwq90+HfzbH70LDfXCVXRNevZ0v 56nQqc0RB54JpWboWzvV3snpw8PzHwjHkzA6/6VCkps7dm5FF0Ra7S6Nap2U21g7 PkEvH99pMtdn3AHCIqvwX1X8d5fWAkwvI6rnsiSbrRoLKqlHKGwM44SYjf4TmHBN xCvtbcA38eQsjMEpXyozY154cRDRR1JU1flyvWeC5FXGU3fFWYC8AyVGah0wvJRJ 4Yw6cWtGCxKv6Vyx/D7NPj8p3Z7TrfiHwwEo4ofFc0wu7vwOAbQUW98QwJfTAc6P Y1uO+oU+BHRZRU65Vtft2DwdKIQCVIc6Flx3pcT7+vno88J9UpA26O0uaT7nyRU+ kLGsziDfvDeoWwknRoRQcn7We3WF0ghh1mJ4QkjRlAMWMcr/5j3lOnCCdwo82lrX PtT7J+fQZdV5mZGHLdMKqr6i9oJVlbkUnimmobdl01Bq9uVvopNJHKgRaxuakY3F KJgqnONtGpjlzxrs/Ht/RFGqn/BTLpGgPN1iG9UkGoxHK+xBgmI= =EkRw -----END PGP SIGNATURE----- --=-25Of7Vall/9efjqcxGqu--