diff options
author | Helmut Grohne <helmut@subdivi.de> | 2025-07-12 23:41:36 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2025-07-12 23:41:36 +0200 |
commit | dfe59b8fb43de011367912733516fef7f9e288bd (patch) | |
tree | f1b3c8798beba270a443100eb7012a3aed8e8a28 | |
parent | a617aa2c146b529caf80b4ddb2f3a188810689a0 (diff) | |
download | python-linuxnamespaces-dfe59b8fb43de011367912733516fef7f9e288bd.tar.gz |
examples/unschroot_fs.py: lie about Location once for all sessions
-rwxr-xr-x | examples/unschroot_fs.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/examples/unschroot_fs.py b/examples/unschroot_fs.py index 1c72beb..d1953bc 100755 --- a/examples/unschroot_fs.py +++ b/examples/unschroot_fs.py @@ -105,6 +105,9 @@ class SessionChroot(ChrootBase): data = super().infodata() data["Session Purged"] = "true" data["Type"] = "unshare" + # It's a gross lie. It has to exist as a directory or sbuild won't + # work. + data["Location"] = "/opt" return data def enter(self) -> None: @@ -181,13 +184,6 @@ class TarSessionChroot(SessionChroot): self.path = path self.name = path.name - def infodata(self) -> dict[str, str]: - data = super().infodata() - # It's a gross lie, but sbuild does not work without. It has to - # actually exist and should not occur inside build logs. - data["Location"] = "/opt" - return data - def enter(self) -> None: os.chdir(self.path) @@ -249,9 +245,6 @@ class DirectorySessionChroot(SessionChroot): data = super().infodata() data["Type"] = "directory" data["Directory"] = str(self.source.path) - # It's a gross lie, but sbuild does not work without. It has to - # actually exist and should not occur inside build logs. - data["Location"] = str(self.source.path) return data def mount(self) -> pathlib.Path: |