Commit Graph

1773 Commits

Author SHA1 Message Date
Jan Kaluza
6fc8c646de Add 'mbs-manager import_module'. 2018-04-03 09:58:57 -04:00
Jan Kaluza
1d46b332b3 Requires version 1.0 of Modulemd 2018-04-03 09:58:57 -04:00
Jan Kaluza
e5e9a24fce Allow adding bool to XMD. Fix flake8 issues. 2018-04-03 09:58:57 -04:00
Jan Kaluza
2482e47c07 Fix issues from review. Drop xmd['mbs']['requires']. Do not allow building MSE builds against non-MSE builds. 2018-04-03 09:58:57 -04:00
Jan Kaluza
31ddbe51a5 Add generate_expanded_mmds which returns list of MMDs which can be submitted as MSE builds and submit them. 2018-04-03 09:58:57 -04:00
Igor Gnatenko
90f292c7f5 tests/mmd_resolver: add test for multiple runtime requires
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
32d053dd98 tests/mmd_resolver: simplify testing
And try to use some real names.

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
d38d55451d tests/mmd_resolver: test empty inclusion/exclusion dependency
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
85af781920 mmd_resolver: add support for streams exclusion
Also fix support for dependencies with empty streams list.

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
ebd6dba78f mmd_resolver: allow configuring output of solve() by policy
Also make results more determenistic.

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
52e73b64c2 mmd_resolver: store alternatives per source package
Input:
* (c0) gtk: [1] + foo: [1]
* (c1) gtk: [1] + foo: [1, 2]

Before:
* c0 + gtk:1 + foo:1
* c1 + gtk:1 + foo:2

After:
* c0 + gtk:1 + foo:1
* c1 + gtk:1 + foo:1
* c1 + gtk:1 + foo:2

Acked-by: Jan Kaluža <jkaluza@redhat.com>
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
e3490d129a mmd_resolver: generate combinations only for top-level dependencies
Reported-by: Petr Šabata <contyk@redhat.com>
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
mprahl
ee43b1bb7d Flake8 fixes 2018-04-03 09:58:57 -04:00
mprahl
eb0b2e1c38 Add the database resolver plugin 2018-04-03 09:58:57 -04:00
mprahl
d338a390b9 Set local builds to the ready state on import 2018-04-03 09:58:57 -04:00
Jan Kaluža
c925ebbd34 tests/mmd_resolver: add tests for multi-dependency modules
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
0f26e1af62 tests/mmd_resolver: deduplicate code for generation test modules
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
8174b933b0 tests/mmd_resolver: add support for multi-dependency modules
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
9d3bcf4a06 mmd_resolver: replace asserts with meaningful exceptions
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
7cbd0a0301 mmd_resolver: rework solvables generation
Now we have good separation between runtime and buildtime dependencies:
If mmd has context, it is built artefact which supposed to have only one
dependency entry, we create solvable with real arch for it. Otherwise we
create multiple solvables with "src" arch.

In "src" solvables, "context" is a number which represents index in
dependencies array.

Stream is not included anymore in "evr" because it's incomparable.
Version is not included anymore in "name" because it's there just for
comparison, nothing more (it's not different module-stream).

As a side, add_requires/add_conflicts/add_provides were replaced with
non-deprecated add_deparray method.

With all this, we are ready to handle MMDs which have multiple elements
in dependencies (modulemd v2).

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
060275f094 mmd_resolver: remove useless provides from modules
That would be never used and is totally useless.

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
652c445b2c mmd_resolver: simplify conflict rule
Conflicting with module(foo) is more than enough to make sure that we
will have only one copy of solvables providing it.

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
9ce5dffb14 mmd_resolver: rewrite function for finding alternatives
Previous version was assuming that number of alternatives is static
which is wrong, they can be appearing depending on solvables.

Also it was checking even impossible combinations (due to using
itertools.product).

Now we check only real possibilities.

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
4ff944477d mmd_resolver: set 'src' arch for build repo solvables
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Jan Kaluža
e7587cb77b add MMDResolver to find possible combinations between modules
Using libsolv for solving part and libmodulemd for getting the data.

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Jan Kaluza
253d29bcef Rewrite ModuleBuild methods to get all streams and all builds using the latest version, not build id. 2018-04-03 09:58:57 -04:00
mprahl
28e821fee0 Start querying modules by context when it's available
When implementing module stream expansion, we'll need to make sure
the buildrequires are queried using their context as well.
2018-04-03 09:58:57 -04:00
mprahl
f19f76872c Use the build object directly instead of its JSON in the modules handler 2018-04-03 09:58:57 -04:00
mprahl
d3f92bf5d3 Make the resolver functions less PDC specific 2018-04-03 09:58:57 -04:00
Jan Kaluza
e22cbbab31 Add get_modules_build_required_by_module_recursively to get the input for libsolv solver. 2018-04-03 09:58:57 -04:00
Jan Kaluza
1bbe8d69f1 Add ModuleBuild methods for getting list of streams, last build in a name:stream and all builds in name:stream:version. 2018-04-03 09:58:57 -04:00
mprahl
f0852d9009 Port to libmodulemd and support v2 modulemd without module stream expansion 2018-04-03 09:58:57 -04:00
Nils Philippsen
329a7acd76 Add GLib.Variant helpers 2018-04-03 09:58:57 -04:00
mprahl
2ace817afd Remove duplicate _get_module call 2018-04-03 09:58:57 -04:00
Yash Nanavati
9b1a8cf4f0 Code for Jenkins to run both py27 and py3 tests 2018-03-06 14:19:34 -05:00
Yash Nanavati
ed25afd9ec Code changes for Python 3 support 2018-03-04 03:22:38 -05:00
Matt Prahl
680da620d7 Merge #870 Minor changes towards Python 3 Compatability 2018-02-28 14:08:53 +00:00
Yash Nanavati
1d3fd2af64 Minor changes towards Python 3 Compatability 2018-02-28 09:01:51 -05:00
mprahl
654820ac31 Fix error that occurs when a batch hasn't started but a repo regen message is received
Fixes #864
2018-02-19 13:56:46 -05:00
mprahl
d6fd203ac0 Disable tox envs that we don't use 2018-02-09 09:16:49 -05:00
mprahl
f5530d9b16 Fix flake8 errors made by jkaluza 2018-02-09 09:12:00 -05:00
Jan Kaluza
6a5d7267fd Save another 20s in tests. 2018-02-09 11:46:12 +01:00
Jan Kaluza
fb1463a036 Remove zeromq time.sleep(1) to make tests even faster. 2018-02-08 20:23:55 +01:00
Matt Prahl
e1ed09d0a2 Merge #860 Decrease time.sleep times in tests to save 60 seconds for test-suite run. 2018-02-08 15:40:45 +00:00
Jan Kaluza
683056de0a Decrease time.sleep times in tests to save 60 seconds for test-suite run. 2018-02-08 09:03:32 +01:00
Jan Kaluza
4001d3c488 Use in-memory SQLite database in tests to make them 40% faster. 2018-02-08 08:01:24 +01:00
mprahl
bc3412683a Update to v1.7.0 v1.7.0 2018-02-07 15:18:44 -05:00
mprahl
e77ce2c5b1 Fix flake8 errors 2018-02-07 15:01:49 -05:00
Matt Prahl
a5c174d9d3 Merge #858 Make components reuse faster by getting the 'previous_module_build', 'mmd' and 'old_mmd' from DB just once. 2018-02-07 19:56:29 +00:00
Jan Kaluza
f32367cee9 Make components reuse faster by getting the 'previous_module_build', 'mmd' and 'old_mmd' from DB just once. 2018-02-07 20:50:49 +01:00