From: James Le Cuirot <chewi@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH] ebuild-writing/variables: better describe ROOT
Date: Tue, 10 May 2016 20:57:08 +0100 [thread overview]
Message-ID: <20160510205708.72f2470b@symphony.aura-online.co.uk> (raw)
In-Reply-To: <CAJ0EP41qOgxghRWWiDvSndO7TDxupEaVL1-H+pnE_c_3f9Kb=g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1712 bytes --]
On Tue, 10 May 2016 14:28:46 -0400
Mike Gilbert <floppym@gentoo.org> wrote:
> On Tue, May 10, 2016 at 11:08 AM, Michael Orlitzky <mjo@gentoo.org>
> 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?
>
> According to PMS, it is only legal in pkg functions.
>
> 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=573306
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=/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=/mnt/foo EPREFIX=/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.
--
James Le Cuirot (chewi)
Gentoo Linux Developer
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 951 bytes --]
next prev parent reply other threads:[~2016-05-10 19:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-08 17:42 [gentoo-dev] [PATCH] ebuild-writing/variables: better describe ROOT Mike Gilbert
2016-05-10 15:08 ` Michael Orlitzky
2016-05-10 15:22 ` M. J. Everitt
2016-05-10 18:28 ` Mike Gilbert
2016-05-10 19:57 ` James Le Cuirot [this message]
2016-05-10 21:25 ` Michael Orlitzky
2016-05-10 21:27 ` Ian Stakenvicius
2016-05-11 1:42 ` Mike Gilbert
2016-05-11 1:54 ` Brian Dolbec
2016-05-11 2:40 ` Mike Gilbert
2016-05-11 2:50 ` Brian Dolbec
2016-05-11 2:19 ` Mike Gilbert
2016-05-11 2:38 ` Mike Gilbert
2016-05-14 21:35 ` Göktürk Yüksek
2016-05-16 3:09 ` Mike Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160510205708.72f2470b@symphony.aura-online.co.uk \
--to=chewi@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox