| |
@@ -102,9 +102,11 @@
|
| |
script_dir = os.path.abspath(sys.argv[1])
|
| |
else:
|
| |
script_dir = os.path.dirname(os.path.realpath(__file__))
|
| |
+ defaults_dir = os.path.abspath(os.path.join(script_dir, '..'))
|
| |
+ overrides_dir = os.path.join(defaults_dir, 'overrides')
|
| |
|
| |
# Get the repo we're running in
|
| |
- repo = git.Repo(script_dir, search_parent_directories=True)
|
| |
+ repo = git.Repo(defaults_dir, search_parent_directories=True)
|
| |
|
| |
# Get the list of files in this repository
|
| |
files = [x for (x, y) in repo.index.entries.keys()]
|
| |
@@ -120,7 +122,6 @@
|
| |
exclusions.append(line.strip())
|
| |
|
| |
# Validate all of the files
|
| |
- merger = Modulemd.ModuleIndexMerger()
|
| |
for file in files:
|
| |
excluded = False
|
| |
for excl in exclusions:
|
| |
@@ -132,16 +133,6 @@
|
| |
if not valid:
|
| |
error("{} failed to validate".format(file))
|
| |
result = os.EX_DATAERR
|
| |
- else:
|
| |
- try:
|
| |
- merger.associate_index(idx, 0)
|
| |
- except GLib.Error as e:
|
| |
- error(
|
| |
- "Could not merge {} with other defaults: {}".format(
|
| |
- file, e.message
|
| |
- )
|
| |
- )
|
| |
- result = os.EX_DATAERR
|
| |
|
| |
if result == os.EX_DATAERR:
|
| |
return result
|
| |
@@ -150,7 +141,9 @@
|
| |
# conflicts arise that weren't detected by the above tests. This should be
|
| |
# impossible.
|
| |
try:
|
| |
- idx = merger.resolve_ext(strict_default_streams=True)
|
| |
+ idx = Modulemd.ModuleIndex()
|
| |
+ idx.update_from_defaults_directory(path=defaults_dir,
|
| |
+ strict=True)
|
| |
except GLib.Error as e:
|
| |
error("Could not merge all defaults: {}".format(e.message))
|
| |
result = os.EX_DATAERR
|
| |
@@ -158,6 +151,28 @@
|
| |
if result == os.EX_OK:
|
| |
info("Merging all of the documents encountered no errors.")
|
| |
|
| |
+ print("\nDefault streams (Runtime):")
|
| |
+ print("================")
|
| |
+ for m, s in idx.get_default_streams().items():
|
| |
+ print("{}:{}".format(m, s))
|
| |
+
|
| |
+ try:
|
| |
+ idx = Modulemd.ModuleIndex()
|
| |
+ idx.update_from_defaults_directory(path=defaults_dir,
|
| |
+ overrides_path=overrides_dir,
|
| |
+ strict=True)
|
| |
+ except GLib.Error as e:
|
| |
+ error("Could not merge all defaults: {}".format(e.message))
|
| |
+ result = os.EX_DATAERR
|
| |
+
|
| |
+ if result == os.EX_OK:
|
| |
+ info("Merging all of the documents encountered no errors.")
|
| |
+
|
| |
+ print("\nDefault streams (Buildroot):")
|
| |
+ print("================")
|
| |
+ for m, s in idx.get_default_streams().items():
|
| |
+ print("{}:{}".format(m, s))
|
| |
+
|
| |
return result
|
| |
|
| |
|
| |
At today's FESCo meeting, we agreed to test out Ursa Prime using only the
avocado
anddwm
modules in the buildroot. These patches update the tests to properly handle the overrides directory and adds override defaults for ant, gimp, maven and scala to drop their default stream.