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 33D641389E2 for ; Thu, 11 Dec 2014 06:51:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C93FAE0B8F; Thu, 11 Dec 2014 06:51:10 +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 3F89BE0B77 for ; Thu, 11 Dec 2014 06:51:10 +0000 (UTC) Received: from [192.168.42.128] (ip70-181-96-121.oc.oc.cox.net [70.181.96.121]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 72B39340278 for ; Thu, 11 Dec 2014 06:51:09 +0000 (UTC) Message-ID: <54893EDB.20407@gentoo.org> Date: Wed, 10 Dec 2014 22:51:07 -0800 From: Zac Medico User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.1 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] emerge --info: Modernize output of configuration of repositories References: <201412082004.14263.Arfrever.FTA@gmail.com> In-Reply-To: <201412082004.14263.Arfrever.FTA@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 163ad674-3d73-4b01-b16e-2bc88a899d64 X-Archives-Hash: 9586d7a19689298572acb6e6b8a2f702 On 12/08/2014 11:04 AM, Arfrever Frehtes Taifersar Arahesis wrote: > [[[ > emerge --info: Modernize output of configuration of repositories. > > - Always print detailed configuration of repositories. > - Always skip PORTAGE_REPOSITORIES variable. > - Always skip deprecated PORTDIR, PORTDIR_OVERLAY and SYNC variables. > ]]] > > -- > Arfrever Frehtes Taifersar Arahesis > It looks good to me, except for the last part I would prefer that we use set, difference_update, and sorted as follows: diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index c7246a9..e763788 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -1739,11 +1739,18 @@ def action_info(settings, trees, myopts, myfiles): 'PORTAGE_BZIP2_COMMAND' : 'bzip2', } - myvars = portage.util.unique_array(myvars) + skipped_vars = ['PORTAGE_REPOSITORIES', '_'] + # Deprecated variables + skipped_vars.extend(('PORTDIR', 'PORTDIR_OVERLAY', 'SYNC')) + + myvars = set(myvars) + myvars.difference_update(skipped_vars) + myvars = sorted(myvars) + use_expand = settings.get('USE_EXPAND', '').split() use_expand.sort() unset_vars = [] - myvars.sort() + for k in myvars: v = settings.get(k) if v is not None: -- Thanks, Zac