if source_file_transfer == SourceFileTransfer.copy_git_others:
what_files += ["--others", "--exclude=.mkosi-*"]
- c = run(["git", "-C", src, "ls-files", "-z", *what_files], stdout=PIPE, text=False, check=True)
+ c = run(["git", "-C", src, "ls-files", "-z", *what_files], stdout=PIPE, text=False)
files = {x.decode("utf-8") for x in c.stdout.rstrip(b"\0").split(b"\0")}
# Add the .git/ directory in as well.
files.add(fr)
# Get submodule files
- c = run(["git", "-C", src, "submodule", "status", "--recursive"], stdout=PIPE, text=True, check=True)
+ c = run(["git", "-C", src, "submodule", "status", "--recursive"], stdout=PIPE, text=True)
submodules = {x.split()[1] for x in c.stdout.splitlines()}
# workaround for git-ls-files returning the path of submodules that we will
["git", "-C", os.path.join(src, sm), "ls-files", "-z"] + what_files,
stdout=PIPE,
text=False,
- check=True,
)
files |= {os.path.join(sm, x.decode("utf-8")) for x in c.stdout.rstrip(b"\0").split(b"\0")}
files -= submodules
part = args.get_partition(PartitionIdentifier.root)
assert part is not None
- run(["sfdisk", "--part-uuid", loopdev, str(part.number), str(u)],
- check=True)
+ run(["sfdisk", "--part-uuid", loopdev, str(part.number), str(u)])
def extract_partition(
p + ".signed",
p,
],
- check=True,
)
os.rename(p + ".signed", p)