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 637CA138252 for ; Tue, 10 May 2016 15:08:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4B72321C03E; Tue, 10 May 2016 15:08: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 51F3BE03EC for ; Tue, 10 May 2016 15:08:23 +0000 (UTC) Received: from [192.168.1.100] (c-98-218-46-55.hsd1.md.comcast.net [98.218.46.55]) (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 02C9F33FE7D for ; Tue, 10 May 2016 15:08:21 +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> From: Michael Orlitzky X-Enigmail-Draft-Status: N1110 Message-ID: <5731F960.50205@gentoo.org> Date: Tue, 10 May 2016 11:08:16 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.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: <1462729330-24788-1-git-send-email-floppym@gentoo.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 0214485c-ab39-4907-9c36-48afece18dfa X-Archives-Hash: dcad5c7e42edcaab191338973663ece0 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())