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 E439E1386F1 for ; Mon, 10 Aug 2015 13:44:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 27922E0845; Mon, 10 Aug 2015 13:44:38 +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 699779573C for ; Mon, 10 Aug 2015 13:44:35 +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 2D0B33409B7 for ; Mon, 10 Aug 2015 13:44:22 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 52127155 for ; Mon, 10 Aug 2015 13:44:19 +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: <1437457648.abad1e97cd2c320ca379bd6e848ee41c420c6bd6.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/main.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: abad1e97cd2c320ca379bd6e848ee41c420c6bd6 X-VCS-Branch: repoman Date: Mon, 10 Aug 2015 13:44:19 +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: f9c15dcf-6a89-4ae9-993a-763be66ae976 X-Archives-Hash: 227b86e1145d1d324a6aea5ca401e27d commit: abad1e97cd2c320ca379bd6e848ee41c420c6bd6 Author: Brian Dolbec gentoo org> AuthorDate: Tue Jun 3 19:32:18 2014 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Tue Jul 21 05:47:28 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=abad1e97 repoman/main.py: Move the check class instantiations out of the xpkg loop This should help reduce overall run time when doing large repoman full runs. It instead re-uses the class instances for each pkg checked. pym/repoman/main.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/pym/repoman/main.py b/pym/repoman/main.py index 3db02a1..d398bb3 100755 --- a/pym/repoman/main.py +++ b/pym/repoman/main.py @@ -273,6 +273,19 @@ if options.if_modified == "y": chain(changed.changed, changed.new, changed.removed), repolevel, reposplit, categories)) +####### initialize our checks classes here before the big xpkg loop +manifester = Manifests(options, qatracker, repoman_settings) +is_ebuild = IsEbuild(repoman_settings, repo_settings, portdb, qatracker) +filescheck = FileChecks(qatracker, repoman_settings, repo_settings, portdb, + vcs_settings) +status_check = VCSStatus(vcs_settings, qatracker) +fetchcheck = FetchChecks(qatracker, repoman_settings, repo_settings, portdb, + vcs_settings) +pkgmeta = PkgMetadata(options, qatracker, repoman_settings) +thirdparty = ThirdPartyMirrors(repoman_settings, qatracker) +use_flag_checks = USEFlagChecks(qatracker, uselist) + + for xpkg in effective_scanlist: # ebuilds and digests added to cvs respectively. logging.info("checking package %s" % xpkg) @@ -289,7 +302,6 @@ for xpkg in effective_scanlist: checkdir_relative = os.path.join(".", checkdir_relative) ##################### - manifester = Manifests(options, qatracker, repoman_settings) if manifester.run(checkdir, portdb): continue if not manifester.generated_manifest: @@ -302,7 +314,6 @@ for xpkg in effective_scanlist: checkdirlist = os.listdir(checkdir) ###################### - is_ebuild = IsEbuild(repoman_settings, repo_settings, portdb, qatracker) pkgs, allvalid = is_ebuild.check(checkdirlist, checkdir, xpkg) if is_ebuild.continue_: # If we can't access all the metadata then it's totally unsafe to @@ -320,26 +331,20 @@ for xpkg in effective_scanlist: ebuildlist = sorted(pkgs.values()) ebuildlist = [pkg.pf for pkg in ebuildlist] ####################### - filescheck = FileChecks(qatracker, repoman_settings, repo_settings, portdb, - vcs_settings) filescheck.check(checkdir, checkdirlist, checkdir_relative, changed.changed, changed.new) ####################### - status_check = VCSStatus(vcs_settings, qatracker) status_check.check(check_ebuild_notadded, checkdir, checkdir_relative, xpkg) eadded.extend(status_check.eadded) ################# - fetchcheck = FetchChecks(qatracker, repoman_settings, repo_settings, portdb, - vcs_settings) fetchcheck.check(xpkg, checkdir, checkdir_relative, changed.changed, changed.new) ################# if check_changelog and "ChangeLog" not in checkdirlist: qatracker.add_error("changelog.missing", xpkg + "/ChangeLog") ################# - pkgmeta = PkgMetadata(options, qatracker, repolevel, repoman_settings) - pkgmeta.check(xpkg, checkdir, checkdirlist) + pkgmeta.check(xpkg, checkdir, checkdirlist, repolevel) muselist = frozenset(pkgmeta.musedict) ################# @@ -397,7 +402,6 @@ for xpkg in effective_scanlist: if not fetchcheck.src_uri_error: ####################### - thirdparty = ThirdPartyMirrors(repoman_settings, qatracker) thirdparty.check(myaux, ebuild.relative_path) ####################### if myaux.get("PROVIDE"): @@ -632,7 +636,6 @@ for xpkg in effective_scanlist: badprovsyntax = badprovsyntax > 0 ################# - use_flag_checks = USEFlagChecks(qatracker, uselist) use_flag_checks.check(pkg, xpkg, ebuild, y_ebuild, muselist) ebuild_used_useflags = use_flag_checks.getUsedUseFlags()