Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/
Date: Wed, 01 Oct 2014 23:02:45
Message-Id: 1412204293.0f65db851225c78530034fb1a8f9622dd3d35b9a.dol-sen@gentoo
1 commit: 0f65db851225c78530034fb1a8f9622dd3d35b9a
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 3 19:32:18 2014 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Wed Oct 1 22:58:13 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0f65db85
7
8 repoman/main.py: Move the check class instantiations out of the xpkg loop
9
10 This should help reduce overall run time when doing large repoman full runs.
11 It instead re-uses the class instances for each pkg checked.
12
13 ---
14 pym/repoman/main.py | 25 ++++++++++++++-----------
15 1 file changed, 14 insertions(+), 11 deletions(-)
16
17 diff --git a/pym/repoman/main.py b/pym/repoman/main.py
18 index 8197400..8a1a043 100755
19 --- a/pym/repoman/main.py
20 +++ b/pym/repoman/main.py
21 @@ -270,6 +270,19 @@ if options.if_modified == "y":
22 chain(changed.changed, changed.new, changed.removed),
23 repolevel, reposplit, categories))
24
25 +####### initialize our checks classes here before the big xpkg loop
26 +manifester = Manifests(options, qatracker, repoman_settings)
27 +is_ebuild = IsEbuild(repoman_settings, repo_settings, portdb, qatracker)
28 +filescheck = FileChecks(qatracker, repoman_settings, repo_settings, portdb,
29 + vcs_settings)
30 +status_check = VCSStatus(vcs_settings, qatracker)
31 +fetchcheck = FetchChecks(qatracker, repoman_settings, repo_settings, portdb,
32 + vcs_settings)
33 +pkgmeta = PkgMetadata(options, qatracker, repoman_settings)
34 +thirdparty = ThirdPartyMirrors(repoman_settings, qatracker)
35 +use_flag_checks = USEFlagChecks(qatracker, uselist)
36 +
37 +
38 for xpkg in effective_scanlist:
39 # ebuilds and digests added to cvs respectively.
40 logging.info("checking package %s" % xpkg)
41 @@ -286,7 +299,6 @@ for xpkg in effective_scanlist:
42 checkdir_relative = os.path.join(".", checkdir_relative)
43
44 #####################
45 - manifester = Manifests(options, qatracker, repoman_settings)
46 if manifester.run(checkdir, portdb):
47 continue
48 if not manifester.generated_manifest:
49 @@ -299,7 +311,6 @@ for xpkg in effective_scanlist:
50 checkdirlist = os.listdir(checkdir)
51
52 ######################
53 - is_ebuild = IsEbuild(repoman_settings, repo_settings, portdb, qatracker)
54 pkgs, allvalid = is_ebuild.check(checkdirlist, checkdir, xpkg)
55 if is_ebuild.continue_:
56 # If we can't access all the metadata then it's totally unsafe to
57 @@ -317,26 +328,20 @@ for xpkg in effective_scanlist:
58 ebuildlist = sorted(pkgs.values())
59 ebuildlist = [pkg.pf for pkg in ebuildlist]
60 #######################
61 - filescheck = FileChecks(qatracker, repoman_settings, repo_settings, portdb,
62 - vcs_settings)
63 filescheck.check(checkdir, checkdirlist, checkdir_relative,
64 changed.changed, changed.new)
65 #######################
66 - status_check = VCSStatus(vcs_settings, qatracker)
67 status_check.check(check_ebuild_notadded, checkdir, checkdir_relative, xpkg)
68 eadded.extend(status_check.eadded)
69
70 #################
71 - fetchcheck = FetchChecks(qatracker, repoman_settings, repo_settings, portdb,
72 - vcs_settings)
73 fetchcheck.check(xpkg, checkdir, checkdir_relative, changed.changed, changed.new)
74 #################
75
76 if check_changelog and "ChangeLog" not in checkdirlist:
77 qatracker.add_error("changelog.missing", xpkg + "/ChangeLog")
78 #################
79 - pkgmeta = PkgMetadata(options, qatracker, repolevel, repoman_settings)
80 - pkgmeta.check(xpkg, checkdir, checkdirlist)
81 + pkgmeta.check(xpkg, checkdir, checkdirlist, repolevel)
82 muselist = frozenset(pkgmeta.musedict)
83 #################
84
85 @@ -394,7 +399,6 @@ for xpkg in effective_scanlist:
86
87 if not fetchcheck.src_uri_error:
88 #######################
89 - thirdparty = ThirdPartyMirrors(repoman_settings, qatracker)
90 thirdparty.check(myaux, ebuild.relative_path)
91 #######################
92 if myaux.get("PROVIDE"):
93 @@ -625,7 +629,6 @@ for xpkg in effective_scanlist:
94 badprovsyntax = badprovsyntax > 0
95
96 #################
97 - use_flag_checks = USEFlagChecks(qatracker, uselist)
98 use_flag_checks.check(pkg, xpkg, ebuild, y_ebuild, muselist)
99
100 ebuild_used_useflags = use_flag_checks.getUsedUseFlags()