From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 641931382DF for ; Thu, 30 Jun 2016 23:36:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AB40AE0A9D; Thu, 30 Jun 2016 23:36:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 502D6E09B2 for ; Thu, 30 Jun 2016 23:36:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ECDF9340ED9 for ; Thu, 30 Jun 2016 23:36:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7170497B for ; Thu, 30 Jun 2016 23:36:23 +0000 (UTC) From: "Paul Varner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Paul Varner" Message-ID: <1467321550.fa12fe254733ca3e6edf5659522da7e048f53adc.fuzzyray@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/equery/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: pym/gentoolkit/equery/uses.py X-VCS-Directories: pym/gentoolkit/equery/ X-VCS-Committer: fuzzyray X-VCS-Committer-Name: Paul Varner X-VCS-Revision: fa12fe254733ca3e6edf5659522da7e048f53adc X-VCS-Branch: master Date: Thu, 30 Jun 2016 23:36:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e1cd5064-cd40-41b7-b2c1-0ee74ec742e5 X-Archives-Hash: f7eb99aaa69ca4c400ba4758b7679877 commit: fa12fe254733ca3e6edf5659522da7e048f53adc Author: Paul Varner gentoo org> AuthorDate: Thu Jun 30 21:06:00 2016 +0000 Commit: Paul Varner gentoo org> CommitDate: Thu Jun 30 21:19:10 2016 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=fa12fe25 equery: Change option --ignore-linguas to --ignore-l10n Change the option to filter out the L10N USE expanded flag. This is to support the transition from using LINGUAS for localization in ebuilds. pym/gentoolkit/equery/uses.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pym/gentoolkit/equery/uses.py b/pym/gentoolkit/equery/uses.py index adf8b6c..79f1118 100644 --- a/pym/gentoolkit/equery/uses.py +++ b/pym/gentoolkit/equery/uses.py @@ -35,7 +35,7 @@ from gentoolkit.flag import get_flags, reduce_flags # Globals # ======= -QUERY_OPTS = {"all_versions" : False, "ignore_linguas" : False} +QUERY_OPTS = {"all_versions" : False, "ignore_l10n" : False} # ========= # Functions @@ -57,7 +57,7 @@ def print_help(with_description=True): print(format_options(( (" -h, --help", "display this help message"), (" -a, --all", "include all package versions"), - (" -i, --ignore-linguas", "don't show linguas USE flags") + (" -i, --ignore-l10n", "don't show l10n USE flags") ))) @@ -187,9 +187,10 @@ def get_output_descriptions(pkg, global_usedesc): usevar = reduce_flags(iuse) usevar.sort() - if QUERY_OPTS['ignore_linguas']: + if QUERY_OPTS['ignore_l10n']: for a in usevar[:]: - if a.startswith("linguas_"): + #TODO: Remove linguas after transition to l10n is complete + if a.startswith("l10n_") or a.startswith("linguas_"): usevar.remove(a) @@ -244,8 +245,8 @@ def parse_module_options(module_opts): sys.exit(0) elif opt in ('-a', '--all'): QUERY_OPTS['all_versions'] = True - elif opt in ('-i', '--ignore-linguas'): - QUERY_OPTS['ignore_linguas'] = True + elif opt in ('-i', '--ignore-l10n'): + QUERY_OPTS['ignore_l10n'] = True def print_legend(): @@ -261,7 +262,7 @@ def main(input_args): """Parse input and run the program""" short_opts = "hai" - long_opts = ('help', 'all', 'ignore-linguas') + long_opts = ('help', 'all', 'ignore-l10n') try: module_opts, queries = gnu_getopt(input_args, short_opts, long_opts)