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 AD1331395D6 for ; Fri, 31 Jul 2015 15:12:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5B8A214017; Fri, 31 Jul 2015 15:12: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 B867314017 for ; Fri, 31 Jul 2015 15:12:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EAF87340B66 for ; Fri, 31 Jul 2015 15:12:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 43B8F112 for ; Fri, 31 Jul 2015 15:12:26 +0000 (UTC) From: "Magnus Granberg" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Magnus Granberg" Message-ID: <1438355485.47e2ce4404f9dfbf6738e27bd5f62482b6dff289.zorry@gentoo> Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: tbc/pym/repoman/ X-VCS-Repository: proj/tinderbox-cluster X-VCS-Files: tbc/pym/repoman/main.py X-VCS-Directories: tbc/pym/repoman/ X-VCS-Committer: zorry X-VCS-Committer-Name: Magnus Granberg X-VCS-Revision: 47e2ce4404f9dfbf6738e27bd5f62482b6dff289 X-VCS-Branch: master Date: Fri, 31 Jul 2015 15:12:26 +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: e60c9a41-f600-4f11-ab0a-d32dc86ad56d X-Archives-Hash: 4de01ee9e3197800b910eee4577fd1f6 commit: 47e2ce4404f9dfbf6738e27bd5f62482b6dff289 Author: Magnus Granberg gentoo org> AuthorDate: Fri Jul 31 15:11:25 2015 +0000 Commit: Magnus Granberg gentoo org> CommitDate: Fri Jul 31 15:11:25 2015 +0000 URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=47e2ce44 move more stuff in repoman main.py tbc/pym/repoman/main.py | 92 +++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/tbc/pym/repoman/main.py b/tbc/pym/repoman/main.py old mode 100755 new mode 100644 index 5bdee0e..2353455 --- a/tbc/pym/repoman/main.py +++ b/tbc/pym/repoman/main.py @@ -164,7 +164,12 @@ def need_signature(filename): return False raise -def repoman_scan(repoman_settings, repo_settings, vcs_settings, options, repolevel): +def repoman_scan(repoman_settings, repo_settings, vcs_settings, portdb, options, myreporoot, mydir, check_changelog, config_root, env): + + # Repoman sets it's own ACCEPT_KEYWORDS and we don't want it to + # behave incrementally. + repoman_incrementals = tuple( + x for x in portage.const.INCREMENTALS if x != 'ACCEPT_KEYWORDS') if options.mode == "manifest": pass @@ -175,6 +180,18 @@ def repoman_scan(repoman_settings, repo_settings, vcs_settings, options, repolev qatracker = QATracker() + reposplit = myreporoot.split(os.path.sep) + repolevel = len(reposplit) + + if options.mode == 'commit': + repochecks.commit_check(repolevel, reposplit) + repochecks.conflict_check(vcs_settings, options) + + changed = Changes(options) + changed.scan(vcs_settings) + + categories = repoman_settings.categories + # Make startdir relative to the canonical repodir, so that we can pass # it to digestgen and it won't have to be canonicalized again. if repolevel == 1: @@ -206,7 +223,14 @@ def repoman_scan(repoman_settings, repo_settings, vcs_settings, options, repolev #################### scanlist = scan(repolevel, reposplit, startdir, categories, repo_settings) - + effective_scanlist = scanlist + if options.if_modified == "y": + effective_scanlist = sorted(vcs_files_to_cps( + chain(changed.changed, changed.new, changed.removed), + repolevel, reposplit, categories)) + if options.if_modified == "y" and len(effective_scanlist) < 1: + logging.warn("--if-modified is enabled, but no modified packages were found!") + #################### dev_keyword = dev_keywords(profiles) @@ -765,13 +789,29 @@ def repoman_scan(repoman_settings, repo_settings, vcs_settings, options, repolev "metadata.warning", "%s/metadata.xml: unused local USE-description: '%s'" % (xpkg, myflag)) + + if have_pmasked and not (options.without_mask or options.ignore_masked): + suggest_ignore_masked = True + if have_dev_keywords and not options.include_dev: + suggest_include_dev = True + + if suggest_ignore_masked or suggest_include_dev: + print() + if suggest_ignore_masked: + print(bold( + "Note: use --without-mask to check " + "KEYWORDS on dependencies of masked packages")) + + if suggest_include_dev: + print(bold( + "Note: use --include-dev (-d) to check " + "dependencies for 'dev' profiles")) + print() + return qatracker def repoman_main(argv, config_root=None, pkgdir=None): - # Repoman sets it's own ACCEPT_KEYWORDS and we don't want it to - # behave incrementally. - repoman_incrementals = tuple( - x for x in portage.const.INCREMENTALS if x != 'ACCEPT_KEYWORDS') + if config_root is None: config_root = os.environ.get("PORTAGE_CONFIGROOT") repoman_settings = portage.config(config_root=config_root, local_config=False) @@ -856,7 +896,6 @@ def repoman_main(argv, config_root=None, pkgdir=None): os.path.join(path, 'profiles', 'categories'))) repoman_settings.categories = frozenset( portage.util.stack_lists([categories], incremental=1)) - categories = repoman_settings.categories portdb.settings = repoman_settings # We really only need to cache the metadata that's necessary for visibility @@ -865,26 +904,7 @@ def repoman_main(argv, config_root=None, pkgdir=None): portdb._aux_cache_keys.update( ["EAPI", "IUSE", "KEYWORDS", "repository", "SLOT"]) - reposplit = myreporoot.split(os.path.sep) - repolevel = len(reposplit) - - if options.mode == 'commit': - repochecks.commit_check(repolevel, reposplit) - repochecks.conflict_check(vcs_settings, options) - - changed = Changes(options) - changed.scan(vcs_settings) - - effective_scanlist = scanlist - if options.if_modified == "y": - effective_scanlist = sorted(vcs_files_to_cps( - chain(changed.changed, changed.new, changed.removed), - repolevel, reposplit, categories)) - - qatracker = repoman_scan(repoman_settings, repo_settings, vcs_settings, options, repolevel) - - if options.if_modified == "y" and len(effective_scanlist) < 1: - logging.warn("--if-modified is enabled, but no modified packages were found!") + qatracker = repoman_scan(repoman_settings, repo_settings, vcs_settings, portdb, options, myreporoot, mydir, check_changelog, config_root, env) if options.mode == "manifest": sys.exit(dofail) @@ -938,24 +958,6 @@ def repoman_main(argv, config_root=None, pkgdir=None): suggest_ignore_masked = False suggest_include_dev = False - if have_pmasked and not (options.without_mask or options.ignore_masked): - suggest_ignore_masked = True - if have_dev_keywords and not options.include_dev: - suggest_include_dev = True - - if suggest_ignore_masked or suggest_include_dev: - print() - if suggest_ignore_masked: - print(bold( - "Note: use --without-mask to check " - "KEYWORDS on dependencies of masked packages")) - - if suggest_include_dev: - print(bold( - "Note: use --include-dev (-d) to check " - "dependencies for 'dev' profiles")) - print() - if options.mode != 'commit': if dofull: print(bold("Note: type \"repoman full\" for a complete listing."))