rwx/rwx/deb/__init__.py
2024-09-13 23:38:08 +02:00

23 lines
501 B
Python

"""Wrap Debian commands."""
import cmd
from rwx import ps
cmd.need("debootstrap")
BOOTSTRAP_ARCHITECTURE = "amd64"
BOOTSTRAP_VARIANT = "minbase"
def bootstrap(root_path: str, suite: str, mirror_location: str) -> None:
"""Boostrap a base operating filesystem."""
command = [
("debootstrap",),
("--arch", BOOTSTRAP_ARCHITECTURE),
("--variant", BOOTSTRAP_VARIANT),
(suite,),
(root_path,),
(mirror_location,),
]
return ps.run(command)