taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit ba765739a514d01adae48370bbf891fa96837bae
parent 97d59d1d3caf32f72607d4fa1d0ab1ef0abf7d47
Author: Florian Dold <florian@dold.me>
Date:   Thu, 12 Jun 2025 22:39:33 +0200

bump, check server for local package freshness

Diffstat:
Mpackaging/ng/buildconfig/taler-exchange.tag | 2+-
Mpackaging/ng/buildconfig/taler-harness.tag | 2+-
Mpackaging/ng/buildconfig/taler-wallet-cli.tag | 2+-
Mpackaging/ng/taler-pkg | 41+++++++++++++++++++++++++++++++++++++----
4 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/packaging/ng/buildconfig/taler-exchange.tag b/packaging/ng/buildconfig/taler-exchange.tag @@ -1 +1 @@ -v1.0.7 +v1.0.8 diff --git a/packaging/ng/buildconfig/taler-harness.tag b/packaging/ng/buildconfig/taler-harness.tag @@ -1 +1 @@ -v1.0.16 +v1.0.17 diff --git a/packaging/ng/buildconfig/taler-wallet-cli.tag b/packaging/ng/buildconfig/taler-wallet-cli.tag @@ -1 +1 @@ -v1.0.16 +v1.0.17 diff --git a/packaging/ng/taler-pkg b/packaging/ng/taler-pkg @@ -189,12 +189,30 @@ def show_published(cfg): distro = cfg.distro vendor, codename = distro.split("-") listfmt = "${package}_${version}_${architecture}.deb\n" - subprocess.run(["ssh", f"taler-packaging@{host}", f"reprepro -b /home/taler-packaging/www/apt/{vendor}/ --list-format '{listfmt}' list {codename}"], check=True) + subprocess.run( + [ + "ssh", + f"taler-packaging@{host}", + f"reprepro -b /home/taler-packaging/www/apt/{vendor}/ --list-format '{listfmt}' list {codename}", + ], + check=True, + ) + def publish(cfg): distro = cfg.distro vendor, codename = distro.split("-") debs = [] + listfmt = "${package}_${version}_${architecture}.deb\n" + server_debs_str = subprocess.check_output( + [ + "ssh", + f"taler-packaging@{host}", + f"reprepro -b /home/taler-packaging/www/apt/{vendor}/ --list-format '{listfmt}' list {codename}", + ], + encoding="utf-8", + ) + server_debs = server_debs_str.split() for component in components: current = None cf = Path(f"./packages/{distro}/{component}.built.current") @@ -203,9 +221,24 @@ def publish(cfg): continue with open(f"./packages/{distro}/{component}.built.current") as f: current = f.read().split() - print(f"component {component} has current packages:") - print(current) - debs.extend(current) + for deb in current: + pkg1, ver1, arch1 = deb.removesuffix(".deb").split("_") + fresh = True + server_deb = None + # If the server has the same or a later version, + # the local version isn't fresh. + for srvdeb in server_debs: + pkg2, ver2, arch2 = srvdeb.removesuffix(".deb").split("_") + if pkg1 != pkg2: + continue + if Dpkg.compare_versions(ver1, ver2) <= 0: + fresh = False + server_deb = srvdeb + break + if fresh: + debs.append(deb) + else: + print("package", deb, "not fresh, server has", server_deb) if len(debs) == 0: print("nothing to upload") return