The summary dictionary used to create summary-{scope}.txt was
previously returned by solve_project() via write_all_groups().
After c46dd3e304d8e66e5f8f6a51bfa3ebda8cba8936, solve_project()
doesn't return anything anymore, as write_all_groups() is being
invoked just after solve_project().
Thus, the "summary" dictionary would always be None.
Since the summary dict creation is generic enough, move it
to its own function, and call it afterwards after project
solving.
This commit also drops the return statement both on write_all_groups()
and write_productcompose() (where it would always return an empty
dictionary), and moves the write_productcompose() call after
solve_project() as well to match the change with write_all_groups().
Signed-off-by: Eugenio Paolantonio <eugenio.paolantonio@suse.com>
Previously pkglistgen.py assumed that a project either used
product-builder or the new product-composer, by exiting unrecoverably
when a *.productcompose.in file was found but the relative
000productcompose directory was absent.
This is not the case for SL Micro as the shared SLFO codebase is still
an hybrid OBS/git project and hence its stagings are not git based and
can't use product composer.
This patch was tested for the SUSE:ALP:Source:Standard:1.0:Staging:A and
SUSE:ALP:Products:Marble:6.0 projects (together with
https://github.com/openSUSE/openSUSE-release-tools/pull/3078). Instead
of raising an exception when the 000productcompose directory is not
found it makes a log stating that product-composer will be skipped.
This was already implemented in ddd2304022e313eca9b391a043b12ecb9afe3bf7
for SLE GA to TEST, but missing in Micro and on the TEST -> PUBLISH leg
in SLE.
Releasing from TEST to PUBLISH might still fail for various reasons.
If it happens, ensure the pipeline exits early with non-zero exit code.
Signed-off-by: Eugenio Paolantonio <eugenio.paolantonio@suse.com>
release rpm files currently do not have .changes files, but these are
needed to extract SOURCE_DATE_EPOCH for reproducible builds.
Using the time stamp of the last commit to any of the input, which is
the 000package-groups and 000update-repos source package, as the time
for the changes entry would be reproducible, however there is resistance
to that.
The other date that is related is the time of the last
source change for any input to the whole distribution, however AFAIK
this date is not cheap enough to compute for OBS-VCS. This hopefully
changes once we move to git.
However to not delay making progress with reproducible builds in
Factory, I propose this change which makes the output of this script
non-reproducible, by using the current wall-clock time. But only when
this script produced a change to be commited. The release binary rpms
will still be reproducible. We can revisit making the generated source
reproducible, later.
See https://reproducible-builds.org/ for more general information on
this topic.