summaryrefslogtreecommitdiff
path: root/mdbp/mmdebstrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'mdbp/mmdebstrap.py')
-rw-r--r--mdbp/mmdebstrap.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/mdbp/mmdebstrap.py b/mdbp/mmdebstrap.py
index aa1f461..c864bce 100644
--- a/mdbp/mmdebstrap.py
+++ b/mdbp/mmdebstrap.py
@@ -63,12 +63,12 @@ def hook_main(buildjsonfilename: str, chrootname: str) -> None:
"""The entry point for the --hook-helper invocation run from mmdebstrap."""
build = json_load(pathlib.Path(buildjsonfilename).open("r"))
chroot = pathlib.Path(chrootname)
- buildpath = pathlib.PurePath(build.get("buildpath", "/build/build"))
+ buildpath = pathlib.PurePath(build.get("build_path", "/build/build"))
fullbuildpath = chroot / buildpath.relative_to("/")
- if "dscpath" in build["input"]:
+ if "source_package_path" in build["input"]:
dscpath = fullbuildpath.parent / \
- pathlib.PurePath(build["input"]["dscpath"]).name
- elif "dscuri" in build["input"]:
+ pathlib.PurePath(build["input"]["source_package_path"]).name
+ elif "source_package_url" in build["input"]:
dscpath = download_dsc(build["input"], fullbuildpath.parent)
priv_drop(["chown", "-R", "build:build", "."],
chroot=chroot, chdir=buildpath.parent)
@@ -87,7 +87,8 @@ def hook_main(buildjsonfilename: str, chrootname: str) -> None:
setuid="build", chroot=chroot, chdir=buildpath.parent)
for path in [*get_dsc_files(dscpath), dscpath]:
path.unlink()
- hostarch = build.get("hostarch") or build.get("buildarch") or \
+ hostarch = build.get("host_architecture") or \
+ build.get("build_architecture") or \
native_architecture()
cmd = [*apt_get, "build-dep", "--host-architecture", hostarch,
*dict(any=["--arch-only"],
@@ -157,8 +158,8 @@ def main() -> None:
raise ValueError("bd-uinstallable-explainer %r not supported" %
build.get("bd-uinstallable-explainer"))
- buildarch = build.get("buildarch") or native_architecture()
- hostarch = build.get("hostarch") or buildarch
+ buildarch = build.get("build_architecture") or native_architecture()
+ hostarch = build.get("host_architecture") or buildarch
if buildarch == hostarch:
buildessential = set(("build-essential", "fakeroot"))
@@ -167,7 +168,7 @@ def main() -> None:
"libc-dev:" + hostarch,
"libstdc++-dev:" + hostarch,
"fakeroot"))
- buildpath = pathlib.PurePath(build.get("buildpath", "/build/build"))
+ buildpath = pathlib.PurePath(build.get("build_path", "/build/build"))
enablelog = build["output"].get("log", True)
cmd = [
@@ -184,10 +185,11 @@ def main() -> None:
'--home-dir %s build --skel /nonexistent' %
shlex.quote(str(buildpath.parent)),
*(["--customize-hook=copy-in " + shlex.join([
- build["input"]["dscpath"],
- *map(str, get_dsc_files(pathlib.Path(build["input"]["dscpath"]))),
+ build["input"]["source_package_path"],
+ *map(str, get_dsc_files(pathlib.Path(
+ build["input"]["source_package_path"]))),
str(buildpath.parent)])]
- if "dscpath" in build["input"] else ()),
+ if "source_package_path" in build["input"] else ()),
'--customize-hook=mdbp-mmdebstrap --hook-helper %s "$1"' %
shlex.quote(args.raw_buildjson),
*(["--customize-hook=sync-out " +