From f0c7c2861843d4390573618949d2d85c1e8f4746 Mon Sep 17 00:00:00 2001 From: "michael.hudson@canonical.com" Date: Mon, 16 Feb 2026 21:24:34 +1300 Subject: [PATCH] isobuilder: pass ignore_dangling_symlinks=True when copying apt config ubuntukylin's /etc/apt/trusted.gpg.d/ubuntukylin-archive-keyring.gpg contains a symlink to "/usr/share/keyrings/ubuntukylin-archive-keyring.gpg" as an absolute path. This obviously doesn't work when not chrooted into the chroot but we don't need to copy it over to the apt config used to build the pool as no package from any archive signed by this key is going to be included in the pool... --- live-build/isobuilder/apt_state.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/isobuilder/apt_state.py b/live-build/isobuilder/apt_state.py index a68ee1e0..27d93271 100644 --- a/live-build/isobuilder/apt_state.py +++ b/live-build/isobuilder/apt_state.py @@ -41,7 +41,7 @@ class AptStateManager: for path in "etc/apt", "var/lib/apt": tgt = self.apt_root.joinpath(path) tgt.parent.mkdir(parents=True, exist_ok=True) - shutil.copytree(chroot.joinpath(path), tgt) + shutil.copytree(chroot.joinpath(path), tgt, ignore_dangling_symlinks=True) self.apt_conf_path.write_text(f'Dir "{self.apt_root}/"; \n') with self.logger.logged("updating apt indices"): self.logger.run(["apt-get", "update"], env=self._apt_env())