From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 6D9B7138252 for ; Tue, 10 May 2016 19:57:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2A48421C028; Tue, 10 May 2016 19:57:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 20117E0869 for ; Tue, 10 May 2016 19:57:23 +0000 (UTC) Received: from symphony.aura-online.co.uk (154.189.187.81.in-addr.arpa [81.187.189.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: chewi) by smtp.gentoo.org (Postfix) with ESMTPSA id E9128340967 for ; Tue, 10 May 2016 19:57:19 +0000 (UTC) Date: Tue, 10 May 2016 20:57:08 +0100 From: James Le Cuirot To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] ebuild-writing/variables: better describe ROOT Message-ID: <20160510205708.72f2470b@symphony.aura-online.co.uk> In-Reply-To: References: <1462729330-24788-1-git-send-email-floppym@gentoo.org> <5731F960.50205@gentoo.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; x86_64-pc-linux-gnu) 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 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/zE3yplZRE2VLm_wD1itC88r"; protocol="application/pgp-signature" X-Archives-Salt: d0b3b68f-aea8-40d5-b8d3-ecfc47d9301e X-Archives-Hash: 7b5593bc5c63ec419f0c27c10c389e81 --Sig_/zE3yplZRE2VLm_wD1itC88r Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 10 May 2016 14:28:46 -0400 Mike Gilbert wrote: > On Tue, May 10, 2016 at 11:08 AM, Michael Orlitzky > wrote: > > We have maybe 150 ebuilds in the tree using $ROOT in src_* > > functions. Some are bugs, but many look OK to me. Do we really want > > to say "never" do that? =20 >=20 > According to PMS, it is only legal in pkg functions. >=20 > Can you point to an example where using ROOT in a src function is > appropriate? I thought that it was necessary for cross-compiling in some cases but I was told that this should be SYSROOT instead. There is a bug open to get that officially described in the PMS. https://bugs.gentoo.org/show_bug.cgi?id=3D573306 Apart from that, I have grepped the tree for ROOT and I think many are confusing it with EPREFIX. The example that stands out most for me is: app-crypt/keybase/keybase-0.8.25.ebuild: dosym "${D}/opt/${PN}/bin/main.js" "${ROOT}/usr/bin/keybase" This is so wrong. If ROOT were /mnt/foo then the final result would be a symlink at /mnt/foo/mnt/foo/usr/bin/keybase and it would point to /var/tmp/portage/app-crypt/keybase-0.8.25/image//opt/keybase/bin/main.js. Fortunately this madness is gone in later versions. If you want to know what ROOT does then try it yourself. ROOT=3D/mnt/foo emerge app-shells/dash This isn't a system you can chroot into but it could be if you emerge the whole of @system. Then trying throwing EPREFIX into the mix. ROOT=3D/mnt/foo EPREFIX=3D/bar emerge app-shells/dash I'm less familiar with prefixed systems and I think very few people mix EPREFIX with ROOT but I try to do right by both. --=20 James Le Cuirot (chewi) Gentoo Linux Developer --Sig_/zE3yplZRE2VLm_wD1itC88r Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1 iQJ8BAEBCgBmBQJXMj0UXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1MjhERTZCRDg2OTFBNDM5MUZEQTJFRDQy MUM2MzIxMjlDNkQ3REU0AAoJECHGMhKcbX3k3R4P/jBGdjC3zKuXDTRYaKjpyeGs USZJ2TsbPvL3qTcxINAyGDuw/Ip0US04AFArFM0jSajfieglm/cwHA4J70pnf+rm Vi7vojicRsJXeTyYIS3031WVB+P6fmeQmyIYctk+EuvhRzfq5VZBonQWodeBvp7f Y0nC/4x4nCalVmtq7E7hup7zySB/hq+0LNY6vWQrHy8QUh/SLEgU5ZpygXLoXS5h 9nyNXUyx0vm1X630/CPeLSJqNG4iLPoY221HAaoGZNmcOAUqC/m35HRBxZ30uLQv cSlyipedjXasmZXF46ozNxDy9KQmMmiz1wQdSfAYUF6WLKkYvf6cBtL2v7JAacXF bFut32HHlfFXOYkdboUytSZoXSOykERZCDMqe4Yl0wnntKbCclGIyanaXCwKxPZA dhj2NevfaKuz+I3BSvIgtb4DRUi/0PYG2PJ9Ww5sX5w+u29NzbIej8udm6sZZdpT 9XxJBnDu4WqJVE/1/GS57uRNsdBGss5+v/RkIrRC/iqIMKScB2l2vmEIKr8z9HK5 2IHOgFv2oeLenobtO4d3CfJ2I8PRNh0O/QJwOhpOA5pQLU2HfwUc62Imq0e639DS WcqokLobQmPH5XjZi3LbqNU3sMEcXSD9lRef6sAH0oqOEJBrUMkxS64JY/4gysUL SFa4YOxyOYw3Uw4TK1/6 =c/T0 -----END PGP SIGNATURE----- --Sig_/zE3yplZRE2VLm_wD1itC88r--