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 2CEF31389E2 for ; Thu, 11 Dec 2014 07:23:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 35F1FE0B91; Thu, 11 Dec 2014 07:23:42 +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 AAD3FE0B4A for ; Thu, 11 Dec 2014 07:23:41 +0000 (UTC) Received: from [10.0.10.112] (unknown [195.254.219.2]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: bernalex) by smtp.gentoo.org (Postfix) with ESMTPSA id 8E2B233FEC9 for ; Thu, 11 Dec 2014 07:23:40 +0000 (UTC) Message-ID: <54894678.8020209@gentoo.org> Date: Thu, 11 Dec 2014 08:23:36 +0100 From: Alexander Berntsen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.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] emerge --info: Modernize output of configuration of repositories References: <201412082004.14263.Arfrever.FTA@gmail.com> <54893EDB.20407@gentoo.org> In-Reply-To: <54893EDB.20407@gentoo.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 74ba2e52-c15c-46ef-8d2a-4ccbbd3b5ed0 X-Archives-Hash: dc5b1808a9f4c3ad01c60118fb779717 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 11/12/14 07:51, Zac Medico wrote: > 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: Yes please. - -- Alexander bernalex@gentoo.org https://secure.plaimi.net/~alexander -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iF4EAREIAAYFAlSJRngACgkQRtClrXBQc7WamgD/T4Vk7YU/pa5hoFWzRF+5CRTz bF9Dl3yH089BoF5JbXEA/2MAwBYJZXoJDjlLmjRm21116gedXoMEEbO0wuu0SBKy =4bUq -----END PGP SIGNATURE-----