-----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
berna...@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-----

Reply via email to