Gentoo Archives: gentoo-commits

From: Magnus Granberg <zorry@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: tbc/pym/repoman/
Date: Fri, 31 Jul 2015 15:12:29
Message-Id: 1438355485.47e2ce4404f9dfbf6738e27bd5f62482b6dff289.zorry@gentoo
1 commit: 47e2ce4404f9dfbf6738e27bd5f62482b6dff289
2 Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 31 15:11:25 2015 +0000
4 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 31 15:11:25 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=47e2ce44
7
8 move more stuff in repoman main.py
9
10 tbc/pym/repoman/main.py | 92 +++++++++++++++++++++++++------------------------
11 1 file changed, 47 insertions(+), 45 deletions(-)
12
13 diff --git a/tbc/pym/repoman/main.py b/tbc/pym/repoman/main.py
14 old mode 100755
15 new mode 100644
16 index 5bdee0e..2353455
17 --- a/tbc/pym/repoman/main.py
18 +++ b/tbc/pym/repoman/main.py
19 @@ -164,7 +164,12 @@ def need_signature(filename):
20 return False
21 raise
22
23 -def repoman_scan(repoman_settings, repo_settings, vcs_settings, options, repolevel):
24 +def repoman_scan(repoman_settings, repo_settings, vcs_settings, portdb, options, myreporoot, mydir, check_changelog, config_root, env):
25 +
26 + # Repoman sets it's own ACCEPT_KEYWORDS and we don't want it to
27 + # behave incrementally.
28 + repoman_incrementals = tuple(
29 + x for x in portage.const.INCREMENTALS if x != 'ACCEPT_KEYWORDS')
30
31 if options.mode == "manifest":
32 pass
33 @@ -175,6 +180,18 @@ def repoman_scan(repoman_settings, repo_settings, vcs_settings, options, repolev
34
35 qatracker = QATracker()
36
37 + reposplit = myreporoot.split(os.path.sep)
38 + repolevel = len(reposplit)
39 +
40 + if options.mode == 'commit':
41 + repochecks.commit_check(repolevel, reposplit)
42 + repochecks.conflict_check(vcs_settings, options)
43 +
44 + changed = Changes(options)
45 + changed.scan(vcs_settings)
46 +
47 + categories = repoman_settings.categories
48 +
49 # Make startdir relative to the canonical repodir, so that we can pass
50 # it to digestgen and it won't have to be canonicalized again.
51 if repolevel == 1:
52 @@ -206,7 +223,14 @@ def repoman_scan(repoman_settings, repo_settings, vcs_settings, options, repolev
53 ####################
54
55 scanlist = scan(repolevel, reposplit, startdir, categories, repo_settings)
56 -
57 + effective_scanlist = scanlist
58 + if options.if_modified == "y":
59 + effective_scanlist = sorted(vcs_files_to_cps(
60 + chain(changed.changed, changed.new, changed.removed),
61 + repolevel, reposplit, categories))
62 + if options.if_modified == "y" and len(effective_scanlist) < 1:
63 + logging.warn("--if-modified is enabled, but no modified packages were found!")
64 +
65 ####################
66
67 dev_keyword = dev_keywords(profiles)
68 @@ -765,13 +789,29 @@ def repoman_scan(repoman_settings, repo_settings, vcs_settings, options, repolev
69 "metadata.warning",
70 "%s/metadata.xml: unused local USE-description: '%s'"
71 % (xpkg, myflag))
72 +
73 + if have_pmasked and not (options.without_mask or options.ignore_masked):
74 + suggest_ignore_masked = True
75 + if have_dev_keywords and not options.include_dev:
76 + suggest_include_dev = True
77 +
78 + if suggest_ignore_masked or suggest_include_dev:
79 + print()
80 + if suggest_ignore_masked:
81 + print(bold(
82 + "Note: use --without-mask to check "
83 + "KEYWORDS on dependencies of masked packages"))
84 +
85 + if suggest_include_dev:
86 + print(bold(
87 + "Note: use --include-dev (-d) to check "
88 + "dependencies for 'dev' profiles"))
89 + print()
90 +
91 return qatracker
92
93 def repoman_main(argv, config_root=None, pkgdir=None):
94 - # Repoman sets it's own ACCEPT_KEYWORDS and we don't want it to
95 - # behave incrementally.
96 - repoman_incrementals = tuple(
97 - x for x in portage.const.INCREMENTALS if x != 'ACCEPT_KEYWORDS')
98 +
99 if config_root is None:
100 config_root = os.environ.get("PORTAGE_CONFIGROOT")
101 repoman_settings = portage.config(config_root=config_root, local_config=False)
102 @@ -856,7 +896,6 @@ def repoman_main(argv, config_root=None, pkgdir=None):
103 os.path.join(path, 'profiles', 'categories')))
104 repoman_settings.categories = frozenset(
105 portage.util.stack_lists([categories], incremental=1))
106 - categories = repoman_settings.categories
107
108 portdb.settings = repoman_settings
109 # We really only need to cache the metadata that's necessary for visibility
110 @@ -865,26 +904,7 @@ def repoman_main(argv, config_root=None, pkgdir=None):
111 portdb._aux_cache_keys.update(
112 ["EAPI", "IUSE", "KEYWORDS", "repository", "SLOT"])
113
114 - reposplit = myreporoot.split(os.path.sep)
115 - repolevel = len(reposplit)
116 -
117 - if options.mode == 'commit':
118 - repochecks.commit_check(repolevel, reposplit)
119 - repochecks.conflict_check(vcs_settings, options)
120 -
121 - changed = Changes(options)
122 - changed.scan(vcs_settings)
123 -
124 - effective_scanlist = scanlist
125 - if options.if_modified == "y":
126 - effective_scanlist = sorted(vcs_files_to_cps(
127 - chain(changed.changed, changed.new, changed.removed),
128 - repolevel, reposplit, categories))
129 -
130 - qatracker = repoman_scan(repoman_settings, repo_settings, vcs_settings, options, repolevel)
131 -
132 - if options.if_modified == "y" and len(effective_scanlist) < 1:
133 - logging.warn("--if-modified is enabled, but no modified packages were found!")
134 + qatracker = repoman_scan(repoman_settings, repo_settings, vcs_settings, portdb, options, myreporoot, mydir, check_changelog, config_root, env)
135
136 if options.mode == "manifest":
137 sys.exit(dofail)
138 @@ -938,24 +958,6 @@ def repoman_main(argv, config_root=None, pkgdir=None):
139 suggest_ignore_masked = False
140 suggest_include_dev = False
141
142 - if have_pmasked and not (options.without_mask or options.ignore_masked):
143 - suggest_ignore_masked = True
144 - if have_dev_keywords and not options.include_dev:
145 - suggest_include_dev = True
146 -
147 - if suggest_ignore_masked or suggest_include_dev:
148 - print()
149 - if suggest_ignore_masked:
150 - print(bold(
151 - "Note: use --without-mask to check "
152 - "KEYWORDS on dependencies of masked packages"))
153 -
154 - if suggest_include_dev:
155 - print(bold(
156 - "Note: use --include-dev (-d) to check "
157 - "dependencies for 'dev' profiles"))
158 - print()
159 -
160 if options.mode != 'commit':
161 if dofull:
162 print(bold("Note: type \"repoman full\" for a complete listing."))