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 D0E84138252 for ; Tue, 10 May 2016 21:23:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1F4C321C04D; Tue, 10 May 2016 21:22:54 +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 3183821C012 for ; Tue, 10 May 2016 21:22:53 +0000 (UTC) Received: from [192.168.1.9] (c-73-39-91-38.hsd1.md.comcast.net [73.39.91.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mjo) by smtp.gentoo.org (Postfix) with ESMTPSA id B81E934092D for ; Tue, 10 May 2016 21:22:51 +0000 (UTC) Subject: Re: [gentoo-dev] [PATCH] ebuild-writing/variables: better describe ROOT To: gentoo-dev@lists.gentoo.org References: <1462729330-24788-1-git-send-email-floppym@gentoo.org> <5731F960.50205@gentoo.org> From: Michael Orlitzky X-Enigmail-Draft-Status: N1110 Message-ID: <573251B8.8090103@gentoo.org> Date: Tue, 10 May 2016 17:25:12 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 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 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 3edb6112-4755-4ae2-a6d2-7a6a0f43cd8f X-Archives-Hash: ff24fa5e2a3704908a8cacf22121e044 On 05/10/2016 02:28 PM, 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? > > 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".