From f7b55f090d902acbf07119658a45e9441c03fbaa Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Fri, 9 Oct 2026 16:40:46 +0200 Subject: [PATCH 1/2] nightswatcher: allow for missing sha256 Accidentally introduced a requirement that it exists in migration of initial poc from weeks or months ago to GitHub monitor, but it doesn't for older files. Also make sure cleanup runs on nightlies, not just releases. Deal with dangling links, should there be any. --- docker/ubuntu/nightswatcher/nightswatcher.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/ubuntu/nightswatcher/nightswatcher.py b/docker/ubuntu/nightswatcher/nightswatcher.py index da447fd..f7a6bc8 100644 --- a/docker/ubuntu/nightswatcher/nightswatcher.py +++ b/docker/ubuntu/nightswatcher/nightswatcher.py @@ -165,13 +165,12 @@ def cp(src, dst): def rm(path): logger.debug('rm %s', path) - Path(path).unlink() + Path(path).unlink(missing_ok=True) def symlink(target, link): logger.debug('ln -sf %s %s', target, link) link = Path(link) - if link.exists(): - link.unlink() + link.unlink(missing_ok=True) link.symlink_to(target) @@ -252,12 +251,13 @@ def on_ota_update(self, release): self.ota[dest_path.name] = asset.sha256 for name in sorted(removed): logger.info('Removing asset: %s', name) + sha256 = self.ota.pop(name) path = self.ota_dir / name rm(path) rm(sha256path(path)) if not path.is_symlink(): - self.by_sha256[self.ota[name]].discard(path) - del self.ota[name] + self.by_sha256[sha256].discard(path) + self.purge_old_versions() def on_new_release(self, release): logger.info('new release: %s', release.tag_name) From 468f4f474b181417453633c8ef095f395388b891 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Fri, 9 Oct 2026 16:45:02 +0200 Subject: [PATCH 2/2] nightswatcher: bump version to 2.2.0 --- docker/ubuntu/nightswatcher/settings.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/ubuntu/nightswatcher/settings.mk b/docker/ubuntu/nightswatcher/settings.mk index 52821d7..b3dc696 100644 --- a/docker/ubuntu/nightswatcher/settings.mk +++ b/docker/ubuntu/nightswatcher/settings.mk @@ -1,4 +1,4 @@ -VERSION = 2.1.0 +VERSION = 2.2.0 IMAGE_BASE = docker.io/library/ubuntu:24.04 IMAGE_PLATFORM = arm64 x86_64