1 |
commit: 2ecf4e2b0ebdf727f2210f3b7db600e781cff1c4 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 30 05:42:54 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 30 06:39:22 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2ecf4e2b |
7 |
|
8 |
repoman: add --experimental-repository-modules=<y|n> option |
9 |
|
10 |
This disables the new repository modules feature by default, |
11 |
and it can be enabled in REPOMAN_DEFAULT_OPTS if desired. |
12 |
|
13 |
repoman/cnf/repository/linechecks.yaml | 252 +++++++++++++++++++++++++++++ |
14 |
repoman/cnf/repository/qa_data.yaml | 160 ++++++++++++++++++ |
15 |
repoman/cnf/repository/repository.yaml | 76 +++++++++ |
16 |
repoman/man/repoman.1 | 4 + |
17 |
repoman/pym/repoman/argparser.py | 5 + |
18 |
repoman/pym/repoman/modules/scan/module.py | 14 +- |
19 |
repoman/pym/repoman/qa_data.py | 11 +- |
20 |
repoman/pym/repoman/scanner.py | 3 +- |
21 |
repoman/setup.py | 4 + |
22 |
9 files changed, 525 insertions(+), 4 deletions(-) |
23 |
|
24 |
diff --git a/repoman/cnf/repository/linechecks.yaml b/repoman/cnf/repository/linechecks.yaml |
25 |
new file mode 100644 |
26 |
index 000000000..bad7df93d |
27 |
--- /dev/null |
28 |
+++ b/repoman/cnf/repository/linechecks.yaml |
29 |
@@ -0,0 +1,252 @@ |
30 |
+--- |
31 |
+# linecheck.yaml |
32 |
+ |
33 |
+# configuration file for the LineCheck plugins run via the multicheck |
34 |
+# scan module |
35 |
+# no random drive-by commits please |
36 |
+# Please obtain authorization from the portage team |
37 |
+# |
38 |
+# Overlay maintainers override/add/negate checks at your discression |
39 |
+# but support for third party module will be limited to the plugin API |
40 |
+# |
41 |
+ |
42 |
+# Repoman API version (do not edit) |
43 |
+version: 1 |
44 |
+# minimum |
45 |
+repoman_version: 2.3.3 |
46 |
+ |
47 |
+eclass_export_functions: |
48 |
+ - ant-tasks |
49 |
+ - apache-2 |
50 |
+ - apache-module |
51 |
+ - aspell-dict |
52 |
+ - autotools-utils |
53 |
+ - base |
54 |
+ - bsdmk |
55 |
+ - cannadic |
56 |
+ - clutter |
57 |
+ - cmake-utils |
58 |
+ - db |
59 |
+ - distutils |
60 |
+ - elisp |
61 |
+ - embassy |
62 |
+ - emboss |
63 |
+ - emul-linux-x86 |
64 |
+ - enlightenment |
65 |
+ - font-ebdftopcf |
66 |
+ - font |
67 |
+ - fox |
68 |
+ - freebsd |
69 |
+ - freedict |
70 |
+ - games |
71 |
+ - games-ggz |
72 |
+ - games-mods |
73 |
+ - gdesklets |
74 |
+ - gems |
75 |
+ - gkrellm-plugin |
76 |
+ - gnatbuild |
77 |
+ - gnat |
78 |
+ - gnome2 |
79 |
+ - gnome-python-common |
80 |
+ - gnustep-base |
81 |
+ - go-mono |
82 |
+ - gpe |
83 |
+ - gst-plugins-bad |
84 |
+ - gst-plugins-base |
85 |
+ - gst-plugins-good |
86 |
+ - gst-plugins-ugly |
87 |
+ - gtk-sharp-module |
88 |
+ - haskell-cabal |
89 |
+ - horde |
90 |
+ - java-ant-2 |
91 |
+ - java-pkg-2 |
92 |
+ - java-pkg-simple |
93 |
+ - java-virtuals-2 |
94 |
+ - kde4-base |
95 |
+ - kde4-meta |
96 |
+ - kernel-2 |
97 |
+ - latex-package |
98 |
+ - linux-mod |
99 |
+ - mozlinguas |
100 |
+ - myspell |
101 |
+ - myspell-r2 |
102 |
+ - mysql |
103 |
+ - mysql-v2 |
104 |
+ - mythtv-plugins |
105 |
+ - oasis |
106 |
+ - obs-service |
107 |
+ - office-ext |
108 |
+ - perl-app |
109 |
+ - perl-module |
110 |
+ - php-ext-base-r1 |
111 |
+ - php-ext-pecl-r2 |
112 |
+ - php-ext-source-r2 |
113 |
+ - php-lib-r1 |
114 |
+ - php-pear-lib-r1 |
115 |
+ - php-pear-r1 |
116 |
+ - python-distutils-ng |
117 |
+ - python |
118 |
+ - qt4-build |
119 |
+ - qt4-r2 |
120 |
+ - rox-0install |
121 |
+ - rox |
122 |
+ - ruby |
123 |
+ - ruby-ng |
124 |
+ - scsh |
125 |
+ - selinux-policy-2 |
126 |
+ - sgml-catalog |
127 |
+ - stardict |
128 |
+ - sword-module |
129 |
+ - tetex-3 |
130 |
+ - tetex |
131 |
+ - texlive-module |
132 |
+ - toolchain-binutils |
133 |
+ - toolchain |
134 |
+ - twisted |
135 |
+ - vdr-plugin-2 |
136 |
+ - vdr-plugin |
137 |
+ - vim |
138 |
+ - vim-plugin |
139 |
+ - vim-spell |
140 |
+ - virtuoso |
141 |
+ - vmware |
142 |
+ - vmware-mod |
143 |
+ - waf-utils |
144 |
+ - webapp |
145 |
+ - xemacs-elisp |
146 |
+ - xemacs-packages |
147 |
+ - xfconf |
148 |
+ - x-modular |
149 |
+ - xorg-2 |
150 |
+ - zproduct |
151 |
+ |
152 |
+eclass_info_experimental_inherit: |
153 |
+ autotools: |
154 |
+ funcs: |
155 |
+ - eaclocal |
156 |
+ - eautoconf |
157 |
+ - eautoheader |
158 |
+ - eautomake |
159 |
+ - eautoreconf |
160 |
+ - _elibtoolize |
161 |
+ - eautopoint |
162 |
+ comprehensive: true |
163 |
+ # Exempt eclasses: |
164 |
+ # git - An EGIT_BOOTSTRAP variable may be used to call one of |
165 |
+ # the autotools functions. |
166 |
+ # subversion - An ESVN_BOOTSTRAP variable may be used to call one of |
167 |
+ # the autotools functions. |
168 |
+ exempt_eclasses: |
169 |
+ - git |
170 |
+ - git-2 |
171 |
+ - subversion |
172 |
+ - autotools-utils |
173 |
+ eutils: |
174 |
+ funcs: |
175 |
+ - estack_push |
176 |
+ - estack_pop |
177 |
+ - eshopts_push |
178 |
+ - eshopts_pop |
179 |
+ - eumask_push |
180 |
+ - eumask_pop |
181 |
+ - epatch |
182 |
+ - epatch_user |
183 |
+ - emktemp |
184 |
+ - edos2unix |
185 |
+ - in_iuse |
186 |
+ - use_if_iuse |
187 |
+ - usex |
188 |
+ comprehensive: false |
189 |
+ flag-o-matic: |
190 |
+ funcs: |
191 |
+ - 'filter-(ld)?flags' |
192 |
+ - 'strip-flags' |
193 |
+ - 'strip-unsupported-flags' |
194 |
+ - 'append-((ld|c(pp|xx)?))?flags' |
195 |
+ - 'append-libs' |
196 |
+ comprehensive: false |
197 |
+ libtool: |
198 |
+ funcs: |
199 |
+ - elibtoolize |
200 |
+ comprehensive: true |
201 |
+ exempt_eclasses: |
202 |
+ - autotools |
203 |
+ multilib: |
204 |
+ funcs: |
205 |
+ - get_libdir |
206 |
+ # These are "eclasses are the whole ebuild" type thing. |
207 |
+ exempt_eclasses: |
208 |
+ - autotools |
209 |
+ - libtool |
210 |
+ - multilib-minimal |
211 |
+ comprehensive: false |
212 |
+ multiprocessing: |
213 |
+ funcs: |
214 |
+ - makeopts_jobs |
215 |
+ comprehensive: false |
216 |
+ prefix: |
217 |
+ funcs: |
218 |
+ - eprefixify |
219 |
+ comprehensive: true |
220 |
+ toolchain-funcs: |
221 |
+ funcs: |
222 |
+ - gen_usr_ldscript |
223 |
+ comprehensive: false |
224 |
+ user: |
225 |
+ funcs: |
226 |
+ - enewuser |
227 |
+ - enewgroup |
228 |
+ - egetent |
229 |
+ - egethome |
230 |
+ - egetshell |
231 |
+ - esethome |
232 |
+ comprehensive: true |
233 |
+ |
234 |
+# non experimental_inherit |
235 |
+eclass_info: |
236 |
+ autotools: |
237 |
+ funcs: |
238 |
+ - eaclocal |
239 |
+ - eautoconf |
240 |
+ - eautoheader |
241 |
+ - eautomake |
242 |
+ - eautoreconf |
243 |
+ - _elibtoolize |
244 |
+ - eautopoint |
245 |
+ comprehensive: true |
246 |
+ ignore_missing: true |
247 |
+ # Exempt eclasses: |
248 |
+ # git - An EGIT_BOOTSTRAP variable may be used to call one of |
249 |
+ # the autotools functions. |
250 |
+ # subversion - An ESVN_BOOTSTRAP variable may be used to call one of |
251 |
+ # the autotools functions. |
252 |
+ exempt_eclasses: |
253 |
+ - git |
254 |
+ - git-2 |
255 |
+ - subversion |
256 |
+ - autotools-utils |
257 |
+ prefix: |
258 |
+ funcs: |
259 |
+ - eprefixify |
260 |
+ comprehensive: true |
261 |
+ |
262 |
+usex_supported_eapis: |
263 |
+ - "0" |
264 |
+ - "1" |
265 |
+ - "2" |
266 |
+ - "3" |
267 |
+ - "4" |
268 |
+ - "4-python" |
269 |
+ - "4-slot-abi" |
270 |
+ |
271 |
+in_iuse_supported_eapis: |
272 |
+ - "0" |
273 |
+ - "1" |
274 |
+ - "2" |
275 |
+ - "3" |
276 |
+ - "4" |
277 |
+ - "4-python" |
278 |
+ - "4-slot-abi" |
279 |
+ - "5" |
280 |
+ - "5-hdepend" |
281 |
+ - "5-progress" |
282 |
|
283 |
diff --git a/repoman/cnf/repository/qa_data.yaml b/repoman/cnf/repository/qa_data.yaml |
284 |
new file mode 100644 |
285 |
index 000000000..4aa961633 |
286 |
--- /dev/null |
287 |
+++ b/repoman/cnf/repository/qa_data.yaml |
288 |
@@ -0,0 +1,160 @@ |
289 |
+--- |
290 |
+# This yaml syntax file holds various configuration data for |
291 |
+# the Quality-Assurance checks performed. |
292 |
+ |
293 |
+# no random drive-by commits please |
294 |
+# Please obtain authorization from the portage team |
295 |
+# |
296 |
+# Overlay maintainers override/add/negate checks at your discression |
297 |
+# but support for third party module will be limited to the plugin API |
298 |
+# |
299 |
+ |
300 |
+# Repoman API version (do not edit) |
301 |
+version: 1 |
302 |
+# minimum |
303 |
+repoman_version: 2.3.3 |
304 |
+ |
305 |
+ |
306 |
+allowed_filename_chars: "a-zA-Z0-9._-+:" |
307 |
+max_description_length: 80 |
308 |
+ |
309 |
+# missingvars check: Mandatory (non-defaulted) ebuild variables |
310 |
+# list |
311 |
+missingvars: |
312 |
+ - KEYWORDS |
313 |
+ - LICENSE |
314 |
+ - DESCRIPTION |
315 |
+ - HOMEPAGE |
316 |
+ |
317 |
+# file.executable check, non executable files |
318 |
+# list |
319 |
+no_exec_files: |
320 |
+ - Manifest |
321 |
+ - ChangeLog |
322 |
+ - metadata.xml |
323 |
+ |
324 |
+# qawarnings: Non-fatal warnings, |
325 |
+# all values in here MUST have a corresponding qahelp entry |
326 |
+# list |
327 |
+qawarnings: |
328 |
+ - changelog.missing |
329 |
+ - changelog.notadded |
330 |
+ - dependency.unknown |
331 |
+ - dependency.badmasked |
332 |
+ - dependency.badindev |
333 |
+ - dependency.badmaskedindev |
334 |
+ - dependency.badtilde |
335 |
+ - dependency.missingslot |
336 |
+ - dependency.perlcore |
337 |
+ - DESCRIPTION.toolong |
338 |
+ - digest.assumed |
339 |
+ - digest.unused |
340 |
+ - EAPI.deprecated |
341 |
+ - ebuild.notadded |
342 |
+ - ebuild.nesteddie |
343 |
+ - ebuild.absdosym |
344 |
+ - ebuild.minorsyn |
345 |
+ - ebuild.badheader |
346 |
+ - ebuild.patches |
347 |
+ - file.empty |
348 |
+ - file.size |
349 |
+ - HOMEPAGE.virtual |
350 |
+ - inherit.unused |
351 |
+ - inherit.deprecated |
352 |
+ - IUSE.rubydeprecated |
353 |
+ - java.eclassesnotused |
354 |
+ - KEYWORDS.dropped |
355 |
+ - KEYWORDS.stupid |
356 |
+ - KEYWORDS.missing |
357 |
+ - LICENSE.deprecated |
358 |
+ - LICENSE.virtual |
359 |
+ - metadata.warning |
360 |
+ - PDEPEND.suspect |
361 |
+ - portage.internal |
362 |
+ - RDEPEND.implicit |
363 |
+ - RDEPEND.suspect |
364 |
+ - repo.eapi-deprecated |
365 |
+ - RESTRICT.invalid |
366 |
+ - usage.obsolete |
367 |
+ - upstream.workaround |
368 |
+ - uri.https |
369 |
+ - virtual.suspect |
370 |
+ - wxwidgets.eclassnotused |
371 |
+ |
372 |
+# ruby_deprecated: Deprecated ruby targets |
373 |
+# list |
374 |
+ruby_deprecated: |
375 |
+ - ruby_targets_ruby18 |
376 |
+ - ruby_targets_ruby19 |
377 |
+ - ruby_targets_ruby20 |
378 |
+ |
379 |
+# suspect_rdepend: Common build only Dependencies |
380 |
+# not usually run time dependencies |
381 |
+# list |
382 |
+suspect_rdepend: |
383 |
+ - app-arch/cabextract |
384 |
+ - app-arch/rpm2targz |
385 |
+ - app-doc/doxygen |
386 |
+ - dev-lang/nasm |
387 |
+ - dev-lang/swig |
388 |
+ - dev-lang/yasm |
389 |
+ - dev-perl/extutils-pkgconfig |
390 |
+ - dev-qt/linguist-tools |
391 |
+ - dev-util/byacc |
392 |
+ - dev-util/cmake |
393 |
+ - dev-util/ftjam |
394 |
+ - dev-util/gperf |
395 |
+ - dev-util/gtk-doc |
396 |
+ - dev-util/gtk-doc-am |
397 |
+ - dev-util/intltool |
398 |
+ - dev-util/jam |
399 |
+ - dev-util/pkg-config-lite |
400 |
+ - dev-util/pkgconf |
401 |
+ - dev-util/pkgconfig |
402 |
+ - dev-util/pkgconfig-openbsd |
403 |
+ - dev-util/scons |
404 |
+ - dev-util/unifdef |
405 |
+ - dev-util/yacc |
406 |
+ - media-gfx/ebdftopcf |
407 |
+ - sys-apps/help2man |
408 |
+ - sys-devel/autoconf |
409 |
+ - sys-devel/automake |
410 |
+ - sys-devel/bin86 |
411 |
+ - sys-devel/bison |
412 |
+ - sys-devel/dev86 |
413 |
+ - sys-devel/flex |
414 |
+ - sys-devel/m4 |
415 |
+ - sys-devel/pmake |
416 |
+ - virtual/linux-sources |
417 |
+ - virtual/linuxtv-dvb-headers |
418 |
+ - virtual/os-headers |
419 |
+ - virtual/pkgconfig |
420 |
+ - x11-misc/bdftopcf |
421 |
+ - x11-misc/imake |
422 |
+ |
423 |
+# suspect_virtual: Dependencies that should usually be made to the virtual |
424 |
+# Not to the final target library |
425 |
+# dictionary |
426 |
+suspect_virtual: |
427 |
+ dev-libs/libusb: virtual/libusb |
428 |
+ dev-libs/libusb-compat: virtual/libusb |
429 |
+ dev-libs/libusbx: virtual/libusb |
430 |
+ dev-util/pkg-config-lite: virtual/pkgconfig |
431 |
+ dev-util/pkgconf: virtual/pkgconfig |
432 |
+ dev-util/pkgconfig: virtual/pkgconfig |
433 |
+ dev-util/pkgconfig-openbsd: virtual/pkgconfig |
434 |
+ |
435 |
+# valid_restrict: ??? |
436 |
+# list |
437 |
+valid_restrict: |
438 |
+ - binchecks |
439 |
+ - bindist |
440 |
+ - fetch |
441 |
+ - installsources |
442 |
+ - mirror |
443 |
+ - preserve-libs |
444 |
+ - primaryuri |
445 |
+ - splitdebug |
446 |
+ - strip |
447 |
+ - test |
448 |
+ - userpriv |
449 |
|
450 |
diff --git a/repoman/cnf/repository/repository.yaml b/repoman/cnf/repository/repository.yaml |
451 |
new file mode 100644 |
452 |
index 000000000..935260424 |
453 |
--- /dev/null |
454 |
+++ b/repoman/cnf/repository/repository.yaml |
455 |
@@ -0,0 +1,76 @@ |
456 |
+--- |
457 |
+# repository-modules.yaml |
458 |
+# |
459 |
+# This is the repository configuration file for repoman modules |
460 |
+# |
461 |
+# no random drive-by commits please |
462 |
+# Please obtain authorization from the portage team |
463 |
+# |
464 |
+# Overlay maintainers override/add/negate checks at your discression |
465 |
+# but support for third party module will be limited to the plugin API |
466 |
+# |
467 |
+ |
468 |
+# Repoman API version (do not edit) |
469 |
+version: 1 |
470 |
+# minimum |
471 |
+repoman_version: 2.3.3 |
472 |
+ |
473 |
+# NOTE: for non-gentoo repos, any custom modules added will need their |
474 |
+# module names to the modules list in order for them to run. |
475 |
+ |
476 |
+# These are the non-mandatory modules that can be disabled/enabled. |
477 |
+# use -foo notation to disable, just like use flags |
478 |
+# Add custom modules to enable them too |
479 |
+scan_modules: |
480 |
+ description |
481 |
+ eapi |
482 |
+ ebuild_metadata |
483 |
+ fetches |
484 |
+ files |
485 |
+ keywords |
486 |
+ live |
487 |
+ manifests |
488 |
+ multicheck |
489 |
+ pkgmetadata |
490 |
+ profile |
491 |
+ restrict |
492 |
+ ruby |
493 |
+ |
494 |
+linechecks_modules: |
495 |
+ assignment |
496 |
+ eapi3assignment |
497 |
+ implicitdepend |
498 |
+ hasq |
499 |
+ useq |
500 |
+ preservelib |
501 |
+ bindnow |
502 |
+ inherit |
503 |
+ dosym |
504 |
+ definition |
505 |
+ srcprepare |
506 |
+ eapi3deprecated |
507 |
+ pkgpretend |
508 |
+ eapi4incompatible |
509 |
+ eapi4gonevars |
510 |
+ paralleldisabled |
511 |
+ autodefault |
512 |
+ gentooheader |
513 |
+ nooffset |
514 |
+ nesteddie |
515 |
+ patches |
516 |
+ emakeparallel |
517 |
+ srccompileeconf |
518 |
+ srcunpackpatches |
519 |
+ portageinternal |
520 |
+ portageinternalvariableassignment |
521 |
+ quote |
522 |
+ quoteda |
523 |
+ httpsuri |
524 |
+ builtwith |
525 |
+ uselesscds |
526 |
+ uselessdodoc |
527 |
+ whitespace |
528 |
+ blankline |
529 |
+ addpredict |
530 |
+ noasneeded |
531 |
+ |
532 |
|
533 |
diff --git a/repoman/man/repoman.1 b/repoman/man/repoman.1 |
534 |
index 6a591e59d..c87146b61 100644 |
535 |
--- a/repoman/man/repoman.1 |
536 |
+++ b/repoman/man/repoman.1 |
537 |
@@ -100,6 +100,10 @@ can be enabled by default for a particular repository by setting |
538 |
Enable experimental inherit.missing checks which may misbehave when the |
539 |
internal eclass database becomes outdated. |
540 |
.TP |
541 |
+\fB\-\-experimental\-repository\-modules=<y|n>\fR |
542 |
+Enable experimental repository modules: |
543 |
+\fLhttps://wiki.gentoo.org/wiki/Project:Portage/Repoman-Module-specs\fR |
544 |
+.TP |
545 |
\fB\-\-if\-modified=<y|n>\fR |
546 |
Only check packages that have uncommitted modifications |
547 |
.TP |
548 |
|
549 |
diff --git a/repoman/pym/repoman/argparser.py b/repoman/pym/repoman/argparser.py |
550 |
index 48cb59eae..b87df95cd 100644 |
551 |
--- a/repoman/pym/repoman/argparser.py |
552 |
+++ b/repoman/pym/repoman/argparser.py |
553 |
@@ -105,6 +105,11 @@ def parse_args(argv, repoman_default_opts): |
554 |
'Enable experimental inherit.missing checks which may misbehave' |
555 |
' when the internal eclass database becomes outdated')) |
556 |
|
557 |
+ parser.add_argument( |
558 |
+ '--experimental-repository-modules', choices=('y', 'n'), metavar="<y|n>", |
559 |
+ default='n', |
560 |
+ help='Enable experimental repository modules') |
561 |
+ |
562 |
parser.add_argument( |
563 |
'-f', '--force', dest='force', action='store_true', |
564 |
default=False, |
565 |
|
566 |
diff --git a/repoman/pym/repoman/modules/scan/module.py b/repoman/pym/repoman/modules/scan/module.py |
567 |
index 28d6668d6..8a7a53638 100644 |
568 |
--- a/repoman/pym/repoman/modules/scan/module.py |
569 |
+++ b/repoman/pym/repoman/modules/scan/module.py |
570 |
@@ -8,8 +8,10 @@ import logging |
571 |
import os |
572 |
import yaml |
573 |
|
574 |
+import portage |
575 |
from portage.module import InvalidModuleName, Modules |
576 |
from portage.util import stack_lists |
577 |
+from repoman import _not_installed |
578 |
from repoman.config import ConfigError |
579 |
|
580 |
MODULES_PATH = os.path.dirname(__file__) |
581 |
@@ -21,12 +23,20 @@ class ModuleConfig(object): |
582 |
'''Holds the scan modules configuration information and |
583 |
creates the ordered list of modulles to run''' |
584 |
|
585 |
- def __init__(self, configpaths, valid_versions=None): |
586 |
+ def __init__(self, configpaths, valid_versions=None, repository_modules=False): |
587 |
'''Module init |
588 |
|
589 |
@param configpaths: ordered list of filepaths to load |
590 |
''' |
591 |
- self.configpaths = [os.path.join(path, 'repository.yaml') for path in configpaths] |
592 |
+ if repository_modules: |
593 |
+ self.configpaths = [os.path.join(path, 'repository.yaml') for path in configpaths] |
594 |
+ elif _not_installed: |
595 |
+ self.configpaths = [os.path.realpath(os.path.join(os.path.dirname( |
596 |
+ os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname( |
597 |
+ os.path.dirname(__file__)))))), 'repoman/cnf/repository/repository.yaml'))] |
598 |
+ else: |
599 |
+ self.configpaths = [os.path.join(portage.const.EPREFIX or '/', |
600 |
+ 'usr/share/repoman/repository/repository.yaml')] |
601 |
logging.debug("ModuleConfig; configpaths: %s", self.configpaths) |
602 |
|
603 |
self.controller = Modules(path=MODULES_PATH, namepath="repoman.modules.scan") |
604 |
|
605 |
diff --git a/repoman/pym/repoman/qa_data.py b/repoman/pym/repoman/qa_data.py |
606 |
index f80ee5a1f..01141a617 100644 |
607 |
--- a/repoman/pym/repoman/qa_data.py |
608 |
+++ b/repoman/pym/repoman/qa_data.py |
609 |
@@ -37,6 +37,7 @@ class QAData(object): |
610 |
repoman_masters layout.conf variable |
611 |
''' |
612 |
# add our base qahelp |
613 |
+ repository_modules = options.experimental_repository_modules == 'y' |
614 |
if _not_installed: |
615 |
cnfdir = os.path.realpath(os.path.join(os.path.dirname( |
616 |
os.path.dirname(os.path.dirname(__file__))), 'cnf/qa_data')) |
617 |
@@ -44,7 +45,15 @@ class QAData(object): |
618 |
cnfdir = os.path.join(portage.const.EPREFIX or '/', 'usr/share/repoman/qa_data') |
619 |
repomanpaths = [os.path.join(cnfdir, _file_) for _file_ in os.listdir(cnfdir)] |
620 |
logging.debug("QAData: cnfdir: %s, repomanpaths: %s", cnfdir, repomanpaths) |
621 |
- repopaths = [os.path.join(path,'qa_data.yaml') for path in repopaths] |
622 |
+ if repository_modules: |
623 |
+ repopaths = [os.path.join(path,'qa_data.yaml') for path in repopaths] |
624 |
+ elif _not_installed: |
625 |
+ repopaths = [os.path.realpath(os.path.join(os.path.dirname( |
626 |
+ os.path.dirname(os.path.dirname(__file__))), |
627 |
+ 'cnf/repository/qa_data.yaml'))] |
628 |
+ else: |
629 |
+ repopaths = [os.path.join(portage.const.EPREFIX or '/', |
630 |
+ 'usr/share/repoman/repository/qa_data.yaml')] |
631 |
infopaths = repomanpaths + repopaths |
632 |
|
633 |
qadata = load_config(infopaths, None, valid_versions) |
634 |
|
635 |
diff --git a/repoman/pym/repoman/scanner.py b/repoman/pym/repoman/scanner.py |
636 |
index f203011e4..c456bbde9 100644 |
637 |
--- a/repoman/pym/repoman/scanner.py |
638 |
+++ b/repoman/pym/repoman/scanner.py |
639 |
@@ -117,7 +117,8 @@ class Scanner(object): |
640 |
# Initialize the ModuleConfig class here |
641 |
# TODO Add layout.conf masters repository.yml config to the list to load/stack |
642 |
self.moduleconfig = ModuleConfig(self.repo_settings.masters_list, |
643 |
- self.repo_settings.repoman_settings.valid_versions) |
644 |
+ self.repo_settings.repoman_settings.valid_versions, |
645 |
+ repository_modules=self.options.experimental_repository_modules == 'y') |
646 |
|
647 |
checks = {} |
648 |
# The --echangelog option causes automatic ChangeLog generation, |
649 |
|
650 |
diff --git a/repoman/setup.py b/repoman/setup.py |
651 |
index 89ef7d5d9..5c58a9a51 100755 |
652 |
--- a/repoman/setup.py |
653 |
+++ b/repoman/setup.py |
654 |
@@ -481,6 +481,10 @@ setup( |
655 |
['$docdir', ['NEWS', 'RELEASE-NOTES']], |
656 |
['share/repoman/qa_data', ['cnf/qa_data/qa_data.yaml']], |
657 |
['share/repoman/linechecks', ['cnf/linechecks/linechecks.yaml']], |
658 |
+ ['share/repoman/repository', [ |
659 |
+ 'cnf/repository/linechecks.yaml', |
660 |
+ 'cnf/repository/qa_data.yaml', |
661 |
+ 'cnf/repository/repository.yaml']], |
662 |
], |
663 |
|
664 |
cmdclass = { |