On 05/10/2016 02:28 PM, Mike Gilbert wrote:
> On Tue, May 10, 2016 at 11:08 AM, Michael Orlitzky <[email protected]> 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?
> 

Modulo the question "when should you use $ROOT over $EPREFIX"...

  * the chrome-binary-plugins ebuilds use it in src_install.

  * dmraid does

      einfo "Appending pkg.m4 from system to aclocal.m4"
      cat "${ROOT}"/usr/share/aclocal/pkg.m4 >>"${S}"/aclocal.m4 || \
        die "Could not append pkg.m4

Both of those look like EPREFIX candidates to me, but they're not
obviously wrong, either. Maybe it made sense in EAPI <= 3.

Anywhere that you need addpredict() it also seems reasonable. The
v4l-dvb-saa716x ebuilds use "${ROOT}/usr/src/linux/" where EPREFIX would
not be a good replacement.

Something needs to be fixed, though: you're right that the PMS limits
ROOT to pkg_*. Who knew? If we want to be serious about banning ROOT in
src_*, we should add a repoman error.

NB: the patch uses the HTTP spelling of "refering".



Reply via email to