public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael Orlitzky <mjo@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH] ebuild-writing/variables: better describe ROOT
Date: Tue, 10 May 2016 11:08:16 -0400	[thread overview]
Message-ID: <5731F960.50205@gentoo.org> (raw)
In-Reply-To: <1462729330-24788-1-git-send-email-floppym@gentoo.org>

On 05/08/2016 01:42 PM, Mike Gilbert wrote:
> The current description of ROOT makes no sense and just confuses people.
> The new description is paraphrased from PMS.

The current version is bad, but the PMS version isn't great either.

We really need examples for D, ROOT, ED, EROOT, and EPREFIX.
When/where/why should they (not) be used? How do they compare/contrast?
A lot of people just guess. Our invocation of emake DESTDIR="${D}"
pretty well explains $D, but how the rest of them interact is left up to
your imagination.

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?

Here's the world's worst bash parser that I used to find them. It
doesn't work, but it gives you a list of likely candidates if you run it
on every ebuild in gentoo.git.


#!/usr/bin/python3

from sys import argv

in_src_func = False

with open(argv[1]) as f:
    for line in f:
        if not in_src_func:
            if line[0:4] == "src_" and line.rstrip()[-1] == "{":
                in_src_func = True
        else:
            if line.rstrip() == "}":
                in_src_func = False
            else:
                if "$ROOT" in line or "${ROOT}" in line:
                    print(argv[1], ":", line.strip())



  reply	other threads:[~2016-05-10 15:08 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 [this message]
2016-05-10 15:22   ` M. J. Everitt
2016-05-10 18:28   ` Mike Gilbert
2016-05-10 19:57     ` James Le Cuirot
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=5731F960.50205@gentoo.org \
    --to=mjo@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