public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] emerge --info: Modernize output of configuration of repositories
Date: Wed, 10 Dec 2014 22:51:07 -0800	[thread overview]
Message-ID: <54893EDB.20407@gentoo.org> (raw)
In-Reply-To: <201412082004.14263.Arfrever.FTA@gmail.com>

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


  parent reply	other threads:[~2014-12-11  6:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08 19:04 [gentoo-portage-dev] [PATCH] emerge --info: Modernize output of configuration of repositories Arfrever Frehtes Taifersar Arahesis
2014-12-09  0:08 ` Brian Dolbec
2014-12-09  8:50 ` Alexander Berntsen
2014-12-09 10:17   ` Arfrever Frehtes Taifersar Arahesis
2014-12-11  6:51 ` Zac Medico [this message]
2014-12-11  7:23   ` Alexander Berntsen
2014-12-13  6:44 ` Arfrever Frehtes Taifersar Arahesis
2014-12-13 11:50   ` Alexander Berntsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54893EDB.20407@gentoo.org \
    --to=zmedico@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox