diff options
author | Helmut Grohne <helmut@subdivi.de> | 2025-05-02 15:03:14 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2025-05-02 15:03:14 +0200 |
commit | 0b4caacc77b6bd8551a68cb704aa27ebda820ee0 (patch) | |
tree | 48ef65edae860e19930a43f0fd988476ef2ac95f /examples | |
parent | cecefa315aece480d724bd07f990dee0334e7c60 (diff) | |
download | python-linuxnamespaces-0b4caacc77b6bd8551a68cb704aa27ebda820ee0.tar.gz |
examples/unschroot.py: actually support using aliases
Fixes: 426f547d5b54 ("examples/unschroot.py: support overlayfs-based directory chroots")
Reported-by: Christoph Berg <myon@debian.org>
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/unschroot.py | 6 |
1 files changed, 5 insertions, 1 deletions
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(): |