forked from Mirror/pmbootstrap
treewide: adopt pathlib.Path and type hinting (MR 2252)
With the new chroot type, we can now write fancy paths in the pythonic way. Convert most of the codebase over, as well as adding various other type hints. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
00383bf354
commit
31cc898dd5
64 changed files with 513 additions and 385 deletions
|
@ -73,7 +73,7 @@ def setup_work(args: PmbArgs, tmpdir):
|
|||
pmb.helpers.run.user(args, ["./pmbootstrap.py", "shutdown"])
|
||||
|
||||
# Link everything from work (except for "packages") to the tmpdir
|
||||
for path in glob.glob(pmb.config.work / "*"):
|
||||
for path in pmb.config.work.glob("*"):
|
||||
if os.path.basename(path) != "packages":
|
||||
pmb.helpers.run.user(args, ["ln", "-s", path, tmpdir + "/"])
|
||||
|
||||
|
@ -91,7 +91,7 @@ def setup_work(args: PmbArgs, tmpdir):
|
|||
f"{tmpdir}/_aports/main/{pkgname}"])
|
||||
|
||||
# Copy pmaports.cfg
|
||||
pmb.helpers.run.user(args, ["cp", args.aports + "/pmaports.cfg", tmpdir +
|
||||
pmb.helpers.run.user(args, ["cp", args.aports / "pmaports.cfg", tmpdir +
|
||||
"/_aports"])
|
||||
|
||||
# Empty packages folder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue