mypy/deb,fs,grub
This commit is contained in:
parent
cd4e7403ae
commit
378a212786
3 changed files with 6 additions and 10 deletions
|
@ -1,8 +1,6 @@
|
||||||
"""Wrap Debian commands."""
|
"""Wrap Debian commands."""
|
||||||
|
|
||||||
import cmd
|
from rwx import cmd, ps
|
||||||
|
|
||||||
from rwx import ps
|
|
||||||
|
|
||||||
cmd.need("debootstrap")
|
cmd.need("debootstrap")
|
||||||
|
|
||||||
|
@ -20,4 +18,4 @@ def bootstrap(root_path: str, suite: str, mirror_location: str) -> None:
|
||||||
(root_path,),
|
(root_path,),
|
||||||
(mirror_location,),
|
(mirror_location,),
|
||||||
]
|
]
|
||||||
return ps.run(command)
|
ps.run(*command)
|
||||||
|
|
|
@ -14,7 +14,7 @@ def create_image(file_path: str, size_bytes: int) -> None:
|
||||||
ps.run(
|
ps.run(
|
||||||
("qemu-img", "create"),
|
("qemu-img", "create"),
|
||||||
("-f", "qcow2"),
|
("-f", "qcow2"),
|
||||||
(file_path, size_bytes),
|
(file_path, str(size_bytes)),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,9 +36,9 @@ def get_mount_uuid(path: str) -> str:
|
||||||
def get_path_mount(path: str) -> str:
|
def get_path_mount(path: str) -> str:
|
||||||
"""Return the mountpoint path of an arbitrary path."""
|
"""Return the mountpoint path of an arbitrary path."""
|
||||||
return ps.run_line(
|
return ps.run_line(
|
||||||
("stat",),
|
"stat",
|
||||||
("--format", "%m"),
|
("--format", "%m"),
|
||||||
(path,),
|
path,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
"""Wrap GRUB commands."""
|
"""Wrap GRUB commands."""
|
||||||
|
|
||||||
import cmd
|
from rwx import cmd, ps
|
||||||
|
|
||||||
from rwx import ps
|
|
||||||
|
|
||||||
cmd.need("grub-mkimage")
|
cmd.need("grub-mkimage")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue