doc/deb
This commit is contained in:
parent
b9754b5dde
commit
2e00140e82
1 changed files with 18 additions and 8 deletions
|
@ -1,5 +1,7 @@
|
||||||
"""Wrap Debian commands."""
|
"""Wrap Debian commands."""
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from rwx import cmd, ps
|
from rwx import cmd, ps
|
||||||
|
|
||||||
cmd.need("debootstrap")
|
cmd.need("debootstrap")
|
||||||
|
@ -8,14 +10,22 @@ BOOTSTRAP_ARCHITECTURE = "amd64"
|
||||||
BOOTSTRAP_VARIANT = "minbase"
|
BOOTSTRAP_VARIANT = "minbase"
|
||||||
|
|
||||||
|
|
||||||
def bootstrap(root_path: str, suite: str, mirror_location: str) -> None:
|
def bootstrap(root_path: Path, suite: str, mirror_location: str) -> None:
|
||||||
"""Boostrap a base operating filesystem."""
|
"""Boostrap a base operating filesystem.
|
||||||
command = [
|
|
||||||
("debootstrap",),
|
:param root_path: target output path
|
||||||
|
:type root_path: Path
|
||||||
|
:param suite: target distribution name
|
||||||
|
:type suite: str
|
||||||
|
:param mirror_location: source input repository
|
||||||
|
:type mirror_location: str
|
||||||
|
"""
|
||||||
|
command = (
|
||||||
|
"debootstrap",
|
||||||
("--arch", BOOTSTRAP_ARCHITECTURE),
|
("--arch", BOOTSTRAP_ARCHITECTURE),
|
||||||
("--variant", BOOTSTRAP_VARIANT),
|
("--variant", BOOTSTRAP_VARIANT),
|
||||||
(suite,),
|
suite,
|
||||||
(root_path,),
|
str(root_path),
|
||||||
(mirror_location,),
|
mirror_location,
|
||||||
]
|
)
|
||||||
ps.run(*command)
|
ps.run(*command)
|
||||||
|
|
Loading…
Reference in a new issue