From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (unknown [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id ED27A1393E9 for ; Tue, 27 May 2014 05:04:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 17845E0874; Tue, 27 May 2014 05:04:29 +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 60FC4E0874 for ; Tue, 27 May 2014 05:04:28 +0000 (UTC) Received: from spoonbill.gentoo.org (unknown [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3D5E833FBD4 for ; Tue, 27 May 2014 05:04:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id DF4C8182D3 for ; Tue, 27 May 2014 05:04:25 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1401167040.10d674e542d54980eea6bcede2819af3504fc85a.dol-sen@gentoo> Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/main.py pym/repoman/repos.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 10d674e542d54980eea6bcede2819af3504fc85a X-VCS-Branch: repoman Date: Tue, 27 May 2014 05:04:25 +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: 6b5938a2-b6f0-4bcf-815b-188e27738902 X-Archives-Hash: fa55f8fb9cfa566329b3fd60e3c6e8d7 commit: 10d674e542d54980eea6bcede2819af3504fc85a Author: Brian Dolbec gentoo org> AuthorDate: Tue May 27 04:09:27 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Tue May 27 05:04:00 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=10d674e5 repoman/main.pt: Move some additional code to repos.py --- pym/repoman/main.py | 23 ++--------------------- pym/repoman/repos.py | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/pym/repoman/main.py b/pym/repoman/main.py index 2697b1b..836ca1e 100755 --- a/pym/repoman/main.py +++ b/pym/repoman/main.py @@ -232,8 +232,8 @@ else: ################### # get lists of valid keywords, licenses, and use -new_data = repo_metadata(repo_settings.portdb) -kwlist, liclist, uselist, profile_list, global_pmaskdict = new_data +new_data = repo_metadata(repo_settings.portdb, repoman_settings) +kwlist, liclist, uselist, profile_list, global_pmaskdict, liclist_deprecated = new_data repoman_settings['PORTAGE_ARCHLIST'] = ' '.join(sorted(kwlist)) repoman_settings.backup_changes('PORTAGE_ARCHLIST') @@ -248,25 +248,6 @@ check_profiles(profiles, repoman_settings.archlist()) #################### -liclist_deprecated = set() -if "DEPRECATED" in repoman_settings._license_manager._license_groups: - liclist_deprecated.update( - repoman_settings._license_manager.expandLicenseTokens(["@DEPRECATED"])) - -if not liclist: - logging.fatal("Couldn't find licenses?") - sys.exit(1) - -if not kwlist: - logging.fatal("Couldn't read KEYWORDS from arch.list") - sys.exit(1) - -if not uselist: - logging.fatal("Couldn't find use.desc?") - sys.exit(1) - -#################### - scanlist = scan(repolevel, reposplit, startdir, categories, repo_settings) #################### diff --git a/pym/repoman/repos.py b/pym/repoman/repos.py index d5eaf60..16de8bf 100644 --- a/pym/repoman/repos.py +++ b/pym/repoman/repos.py @@ -148,8 +148,27 @@ class RepoSettings(object): logging.error(line) sys.exit(1) +def list_checks(kwlist, liclist, uselist, repoman_settings): + liclist_deprecated = set() + if "DEPRECATED" in repoman_settings._license_manager._license_groups: + liclist_deprecated.update( + repoman_settings._license_manager.expandLicenseTokens(["@DEPRECATED"])) -def repo_metadata(portdb): + if not liclist: + logging.fatal("Couldn't find licenses?") + sys.exit(1) + + if not kwlist: + logging.fatal("Couldn't read KEYWORDS from arch.list") + sys.exit(1) + + if not uselist: + logging.fatal("Couldn't find use.desc?") + sys.exit(1) + return liclist_deprecated + + +def repo_metadata(portdb, repoman_settings): # get lists of valid keywords, licenses, and use kwlist = set() liclist = set() @@ -236,7 +255,8 @@ def repo_metadata(portdb): global_pmaskdict.setdefault(x.cp, []).append(x) del global_pmasklines - return (kwlist, liclist, uselist, profile_list, global_pmaskdict) + return (kwlist, liclist, uselist, profile_list, global_pmaskdict, + list_checks(kwlist, liclist, uselist, repoman_settings)) def has_global_mask(pkg, global_pmaskdict):