This has multiple benefits:
* Easier to interface with the python code that calls it
* Uses the osc python interface for connection and authentication handling
* Allows to drop the bundled OBS code in the bs_copy directory
We will check if there are approved pkglistgen comments and if so, apply
them to the target. For this we need to parse the generated markdown, so
refactor both in a common class.
There diff is applied, but not yet commited in this commit
Since 30daff5613803667be7422056431116e84c07d59 we check if the repos are
still what we expected them to be when we started and stop calculating
weakremovers.inc if the build didn't stay still for the full runtime of
the pkglistgen. But the exception makes it impossible to spot real
failures - so make this a regular exit
In some cases we'd like to chose from all available repositories
for selecting the right package. in appliance builds and there
is an OBS-UseUnorderedRepos flag for enabling this behavior. Similarly
product-builds have a flag "use_newest_version" that can be set
to true. pkglistgen needs to know about these variant as well
to properly resolve package dependencies.
Not caching them kills botmaster's performance. So we need to keep
that but try to avoid races differently by copying the files from
cachedir to local dir.
The weakremovers.inc is still flickering and the only explanation left
is that other pipelines break the solv file during the (quite long)
runtime of the pkglistgen pipeline.
So stop relying on the solv file in the global cache directory - the
repo itself is not as dangerous, but the solv should live in the working
directory while it's running
15.3 introduced something unexpected: aarch64, ppc64le and s390x are part
of the repos - and all architectures that aren't native to openSUSE:Factory
are considered to bear dropped packages, e.g. *all of them*
On top of that the setdefault using the same hash caused packages to come
and go for repos, creating unstable output
repository_arch_state doesn't raise HTTPError for 404 any more, but that's what
pkglistgen uses to skip that repo/arch. Handle None as replacement instead.
We ignored conflicts/obsoletes during pool preparation as it got
into the way of finding supplements (due to conflicting packages in
the list). But this way, conflicts were invisible also during dependency
search, leading to wrong packages picked for the package lists in
general.
So add a flag to prepare_pool to explain if we want conflicts or not