From 0b4caacc77b6bd8551a68cb704aa27ebda820ee0 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Fri, 2 May 2025 15:03:14 +0200 Subject: examples/unschroot.py: actually support using aliases Fixes: 426f547d5b54 ("examples/unschroot.py: support overlayfs-based directory chroots") Reported-by: Christoph Berg --- examples/unschroot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/unschroot.py b/examples/unschroot.py index 32a93b5..7da6e9a 100755 --- a/examples/unschroot.py +++ b/examples/unschroot.py @@ -270,9 +270,13 @@ def scan_chroots() -> dict[str, ChrootBase]: chroots.append(path) for path in chroots: chroot = cls(path) - chroot.aliases.update(aliases.get(path.name, set())) + chrootaliases = aliases.get(path.name, set()) + chroot.aliases.update(chrootaliases) if chroot.name not in chrootmap: chrootmap[chroot.name] = chroot + for alias in chrootaliases: + if alias not in chrootmap: + chrootmap[alias] = chroot if CACHE_UNSCHROOT.is_dir(): for path in CACHE_UNSCHROOT.iterdir(): -- cgit v1.2.3