From d8f09b6f4b3f81210c3894f02e66934935194c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Mon, 27 Sep 2021 20:40:48 +0200 Subject: [PATCH] ansible: publish packages with xbps-repodb --- ansible/roles/buildmaster/templates/master.cfg.j2 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ansible/roles/buildmaster/templates/master.cfg.j2 b/ansible/roles/buildmaster/templates/master.cfg.j2 index 4bfdc335..f5f91f4a 100644 --- a/ansible/roles/buildmaster/templates/master.cfg.j2 +++ b/ansible/roles/buildmaster/templates/master.cfg.j2 @@ -100,6 +100,10 @@ bash -c 'for repo in {hostdir}/binpkgs/multilib {hostdir}/binpkgs/multilib/nonfr get_pkgs = ['make', 'print_pkgs'] bulk_make = ['make'] + stage_to_index = """ +bash -c 'XBPS_ARCH={mach} xbps-repodb --index $(for repo in "" debug nonfree multilib multilib/nonfree; do [ -d {hostdir}/binpkgs/$repo ] && echo {hostdir}/binpkgs/$repo; done)' +""".format(hostdir=hostdir, mach=m['mach']) + bulk_clean_step = Git(repourl=bulk_url, branch='master', mode='incremental', haltOnFailure=True, logEnviron=False, progress=True, workdir=bulkdir, @@ -135,6 +139,11 @@ bash -c 'for repo in {hostdir}/binpkgs/multilib {hostdir}/binpkgs/multilib/nonfr descriptionDone=[WithProperties("Finished building packages: %s", 'pkgs')], workdir=builddir, haltOnFailure=True, usePTY=True, timeout=14400, decodeRC={0:SUCCESS,1:FAILURE,2:FAILURE}) + stage_to_index_step = ShellCommand(command=stage_to_index, logEnviron=False, + description="Moving packages from stage to index", + descriptionDone="Packages moved to index", + workdir='.', haltOnFailure=True, usePTY=True, timeout=14400, + decodeRC={0:SUCCESS,1:FAILURE,2:FAILURE}) remove_obsoletes_step = ShellCommand(command=RemoveObsoletes, logEnviron=False, description=["Removing obsolete packages"], descriptionDone=["Finished removing obsolete packages"], @@ -149,7 +158,7 @@ bash -c 'for repo in {hostdir}/binpkgs/multilib {hostdir}/binpkgs/multilib/nonfr m['bulk_factory_steps'] = [ bulk_clean_step, git_clean_step, bootinst_step, bootup_step, conf_step, get_pkgs_step, make_step, - remove_obsoletes_step + stage_to_index_step, remove_obsoletes_step ] # since i686 writes the x86_64 multilib repository,