The build steps assume that the the repository for the build is non-modular,
so after the final createrepo is run with include_module_yaml=True, it's
impossible to repeat a build steps. Running mock -c <failed_config> build is
quite useful for debugging a failed build (even though it's hard to find the
right config) - skipping the final createrepo step for failed module builds
makes it work as expected.
get_module_modulemds() was documented to return only the latest version,
but actually returned all versions. Because this wasn't anticipated in
the libsolv usage for module resolution, a more-or-less arbitrary version
would be picked to build local builds against instead of the latest one.
system_resolver is created based on loaded configuration, which could
avoid calls like `GenericResolver.create(conf)` repeatedly in the code.
However, if some cases need to create a specific resolver explicitly,
`GenericResolver.create` could be called with addition argument, for
example db or mbs is passed to argument backend in tests.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
The list of arches we compare against should not include multilib
arches. Otherwise excluding does not behave correctly.
Example:
A build has ExcludeArch: i686 (because it only works on 64 bit arches).
A noarch package is built there, but it would be excluded from x86_64.
Relates: https://pagure.io/pungi/pull-request/1050
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
During I'm reading through the code base to learn MBS, I found out some
typos and minor issues in some other docstrings, and I also found some
docstrings with extra informative description could make it easier to
understand the code.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
dup_nsvc prints version in hexadecimal instead of integer. This is found
in libmodulemd 1.6.2 f28 build. This bug has been fixed in upstream but
not release yet. Before the release, this patch formats NSVC manually to
workaround it.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
This bug was reported by @nphilipp here https://bodhi.fedoraproject.org/updates/FEDORA-2018-c9c3a37d96
The issue is that the `record_filtered_rpms` method returns a new xmd
buildrequires block, but whole buildrequires entries were omitted in the return
value for local builds. This one-liner includes them again.
First, rename LocalBuilder to SRPMBuilder. Reading the manpage for mock tells
me that the `--rebuild` option is specifically for rebuilding a given srpm.
The class was just named poorly (imo).
Second, change the type detection. The bug I'm trying to fix is if you try to
pass a string for the `repository:` in your modulemd like
`file:///home/user/repos/libfoo/`. The old logic here would assume that it is
an srpm since it didn't start with "git" or "http", but that's not correct. We
have people who want to experiment with building modules with components that
are not publicly accessible over the network - which are only local. This
change allows that.