"--no-announce-submounts",
"--sandbox=chroot",
f"--inode-file-handles={'prefer' if os.getuid() == 0 and not uidmap else 'never'}",
+ "--log-level=error",
] # fmt: skip
if selinux:
fs = config.distribution.filesystem()
extra = config.environment.get(f"SYSTEMD_REPART_MKFS_OPTIONS_{fs.upper()}", "")
run(
- [f"mkfs.{fs}", "-L", "scratch", *extra.split(), workdir(Path(scratch.name))],
- stdout=subprocess.DEVNULL,
+ [f"mkfs.{fs}", "-L", "scratch", "-q", *extra.split(), workdir(Path(scratch.name))],
sandbox=config.sandbox(options=["--bind", scratch.name, workdir(Path(scratch.name))]),
)
yield Path(scratch.name)
if use_subvolumes != ConfigFeature.disabled:
result = run(
- ["btrfs", "subvolume", "create", workdir(path, sandbox)],
+ ["btrfs", "--quiet", "subvolume", "create", workdir(path, sandbox)],
sandbox=sandbox(options=["--bind", path.parent, workdir(path.parent, sandbox)]),
check=use_subvolumes == ConfigFeature.enabled,
).returncode
dst.rmdir()
result = run(
- ["btrfs", "subvolume", "snapshot", workdir(src, sandbox), workdir(dst, sandbox)],
+ ["btrfs", "--quiet", "subvolume", "snapshot", workdir(src, sandbox), workdir(dst, sandbox)],
check=use_subvolumes == ConfigFeature.enabled,
sandbox=sandbox(options=options),
).returncode
# Silence and ignore failures since when not running as root, this will fail with a permission error
# unless the btrfs filesystem is mounted with user_subvol_rm_allowed.
run(
- ["btrfs", "subvolume", "delete", *(workdir(p, sandbox) for p in subvolumes)],
+ ["btrfs", "--quiet", "subvolume", "delete", *(workdir(p, sandbox) for p in subvolumes)],
check=False,
sandbox=sandbox(
options=flatten(("--bind", p.parent, workdir(p.parent, sandbox)) for p in subvolumes),