From 71dc630343d18a1eebc26de1b8bb22374f234c66 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sun, 24 Oct 2021 08:52:55 +0200 Subject: [PATCH 1/2] pkglistgen: Generate the release packages first If the release package changes, we don't bother syncing the repos (as the repo will be dirty in the 2nd step) --- gocd/pkglistgen.opensuse.gocd.yaml | 28 +++++++++++++++++++------- gocd/pkglistgen.opensuse.gocd.yaml.erb | 4 +++- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/gocd/pkglistgen.opensuse.gocd.yaml b/gocd/pkglistgen.opensuse.gocd.yaml index bd5542a8..7c057cf8 100644 --- a/gocd/pkglistgen.opensuse.gocd.yaml +++ b/gocd/pkglistgen.opensuse.gocd.yaml @@ -20,37 +20,51 @@ pipelines: resources: - repo-checker tasks: - - script: python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory -s target + - script: | + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory -s target --only-release-packages + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory -s target openSUSE_Factory_rings: resources: - repo-checker tasks: - - script: python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory -s rings + - script: | + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory -s rings --only-release-packages + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory -s rings openSUSE_Factory_ARM_target: resources: - repo-checker tasks: - - script: python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:ARM -s target + - script: | + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:ARM -s target --only-release-packages + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:ARM -s target openSUSE_Factory_ARM_rings: resources: - repo-checker tasks: - - script: python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:ARM -s rings + - script: | + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:ARM -s rings --only-release-packages + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:ARM -s rings openSUSE_Factory_PowerPC: resources: - repo-checker tasks: - - script: python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:PowerPC + - script: | + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:PowerPC --only-release-packages + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:PowerPC openSUSE_Factory_zSystems: resources: - repo-checker tasks: - - script: python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:zSystems + - script: | + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:zSystems --only-release-packages + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:zSystems openSUSE_Factory_RISCV: resources: - repo-checker tasks: - - script: python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:RISCV + - script: | + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:RISCV --only-release-packages + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:RISCV Update.Repos.Factory: group: Factory.pkglistgen lock_behavior: unlockWhenFinished diff --git a/gocd/pkglistgen.opensuse.gocd.yaml.erb b/gocd/pkglistgen.opensuse.gocd.yaml.erb index 1e7e8cf5..8aa43d37 100644 --- a/gocd/pkglistgen.opensuse.gocd.yaml.erb +++ b/gocd/pkglistgen.opensuse.gocd.yaml.erb @@ -28,7 +28,9 @@ pipelines: resources: - repo-checker tasks: - - script: python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p <%= project[0] %><%= options %> + - script: | + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p <%= project[0] %><%= options %> --only-release-packages + python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p <%= project[0] %><%= options %> <% end -%> Update.Repos.Factory: group: Factory.pkglistgen From 241f7a966a31119e4af9d63f5942b057c2b8372f Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sun, 24 Oct 2021 08:57:31 +0200 Subject: [PATCH 2/2] pkglistgen: Do not generate weakremovers if in release package mode Technically the weakremovers.inc is part of the release package, but it can only be calculated in the context of the full product build --- pkglistgen/tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkglistgen/tool.py b/pkglistgen/tool.py index 24ae64e0..0b8fca6f 100644 --- a/pkglistgen/tool.py +++ b/pkglistgen/tool.py @@ -684,7 +684,7 @@ class PkgListGen(ToolBase.ToolBase): if stop_after_solve: return - if drop_list: + if drop_list and not only_release_packages: weakremovers_file = os.path.join(release_dir, 'weakremovers.inc') self.create_weakremovers(project, target_config, oldrepos_dir, output=open(weakremovers_file, 'w'))