summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2024-06-11 17:42:07 +0200
committerHelmut Grohne <helmut@subdivi.de>2024-06-11 18:08:57 +0200
commite404a83f9225639636e1f955d0caf7df4df75cfe (patch)
tree2f8811451247c75a2dd55edc128a68a025ca747d
parenta584d4d11ff557062de9ba0a14246fb859834dc3 (diff)
downloadpython-linuxnamespaces-e404a83f9225639636e1f955d0caf7df4df75cfe.tar.gz
unschroot: report "Type unshare" for our sessions
Any existing type would be an invalid promise. While sbuild parses the type, it also currently throws its value away and does not base any decisions on it. With the new value, it could recognize unschroot and opt into new features.
-rwxr-xr-xexamples/unschroot.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/unschroot.py b/examples/unschroot.py
index 01029f7..88c105f 100755
--- a/examples/unschroot.py
+++ b/examples/unschroot.py
@@ -71,7 +71,13 @@ class Chroot:
if self.namespace == "Chroot":
lines.extend(["Type file", f"File {self.path}"])
if self.namespace == "Session":
- lines.extend([f"Location {self.path}", "Session Purged true"])
+ lines.extend(
+ [
+ f"Location {self.path}",
+ "Session Purged true",
+ "Type unshare",
+ ]
+ )
lines.append("Aliases " + " ".join(sorted(self.aliases)))
return "".join(map("%s\n".__mod__, lines))