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 A1AB51389E2 for ; Mon, 22 Dec 2014 18:34:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B24DE08F5; Mon, 22 Dec 2014 18:34:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A496AE0866 for ; Mon, 22 Dec 2014 18:34:02 +0000 (UTC) Received: from [10.0.31.246] (unknown [100.42.98.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 0EF2F33DA93 for ; Mon, 22 Dec 2014 18:34:02 +0000 (UTC) Message-ID: <54986418.1070903@gentoo.org> Date: Mon, 22 Dec 2014 10:34:00 -0800 From: Zac Medico User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH] Support override of default profile EAPI (532670) References: <1418845194-24791-1-git-send-email-zmedico@gentoo.org> <549815A5.4070404@gentoo.org> In-Reply-To: <549815A5.4070404@gentoo.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 042cf129-5bd9-4a37-99ff-f66673235392 X-Archives-Hash: 6e4bfc19aee3b7117c94ec9579a34123 On 12/22/2014 04:59 AM, Alexander Berntsen wrote: > The idea presented in the commit message header is very good. The > implementation discussed in the commit message body sounds a bit > messy, but I can't immediately think of another way to support this. Given existing state of the code, I think my implementation is quite reasonable. It's seems a bit messy because the functions/methods involved need to deal with 3 different kinds of profile nodes: 1) Regular profile nodes 2) User profile override directory in /etc/portage/profile 3) The root "profiles" directory, which is not really a profile node, but is used for repository-level configurations (package.mask being the most common example used by Gentoo) I will add a note about this to the commit message, since it's not completely obvious unless you have had to dive into this code for some reason. > Can you? Can anyone else? No, not without making extensive changes to the existing code (probably without much payoff). However, the changes that I've made do produce the intended result, and they make the existing code more flexible by making it possible to override the repository-level default. My changes also significantly reduce the number of read_corresponding_eapi_file calls, which seems more organized because this way a given node's EAPI only needs to be determined once rather than through repeated (memoized) calls to read_corresponding_eapi_file. > I'd like to have more of a discussion before this is merged. Yeah, it's good to have others check my work, because there are lots of opportunities for small logic errors here. However, I'm confident that the current patch is bug-free, since I have tested many different scenarios by tweaking values in the unit test. > The patch itself looks OK though. Great, thanks for your feedback! -- Thanks, Zac