summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2024-06-11 10:19:35 +0200
committerHelmut Grohne <helmut@subdivi.de>2024-06-11 10:19:35 +0200
commita584d4d11ff557062de9ba0a14246fb859834dc3 (patch)
treee3ddef17641920aead334bc0feaf7dfc5446fd5f
parent1074440a14daf70e655a8b9dac3ce9ccc0c331dd (diff)
downloadpython-linuxnamespaces-a584d4d11ff557062de9ba0a14246fb859834dc3.tar.gz
unschroot: tweak --info output
* Tag sessions as "Session Purged". This causes sbuild to skip uninstalling build-depends and other cleanup. * Always emit "Aliases" even when empty as we get a warning from sbuild otherwise.
-rwxr-xr-xexamples/unschroot.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/unschroot.py b/examples/unschroot.py
index fe37b9d..01029f7 100755
--- a/examples/unschroot.py
+++ b/examples/unschroot.py
@@ -71,9 +71,8 @@ class Chroot:
if self.namespace == "Chroot":
lines.extend(["Type file", f"File {self.path}"])
if self.namespace == "Session":
- lines.append(f"Location {self.path}")
- if self.aliases:
- lines.append("Aliases " + " ".join(sorted(self.aliases)))
+ lines.extend([f"Location {self.path}", "Session Purged true"])
+ lines.append("Aliases " + " ".join(sorted(self.aliases)))
return "".join(map("%s\n".__mod__, lines))
@classmethod