diff options
Diffstat (limited to 'mdbp/common.py')
-rw-r--r-- | mdbp/common.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/mdbp/common.py b/mdbp/common.py index 7a528bc..719a8b6 100644 --- a/mdbp/common.py +++ b/mdbp/common.py @@ -42,11 +42,11 @@ def buildjson_validate(buildobj: JsonObject) -> None: def buildjson_patch_relative(buildobj: JsonObject, basedir: pathlib.PurePath) -> None: """Resolve relative paths used in the buildobj using the given basedir: - * .input.dscpath + * .input.source_package_path * .output.directory The operation is performed in-place and modifes the given buildobj. """ - for attrs in (("input", "dscpath"), ("output", "directory")): + for attrs in (("input", "source_package_path"), ("output", "directory")): obj = buildobj for attr in attrs[:-1]: try: @@ -73,7 +73,7 @@ def compute_env(build: JsonObject) -> typing.Dict[str, str]: parallel = build.get("parallel") if parallel == "auto": parallel = "%d" % multiprocessing.cpu_count() - options = build.get("options", []) + options = build.get("build_options", []) if parallel: options.append("parallel=" + str(parallel)) if options: @@ -120,10 +120,11 @@ def download(uri: str, checksums: typing.Dict[str, str], def download_dsc(buildinput: JsonObject, destdir: pathlib.Path) -> pathlib.Path: - """Download the .input.dscuri including referenced components to the given - destination directory and return the path to the contained .dsc file. + """Download the .input.source_package_url including referenced components + to the given destination directory and return the path to the contained + .dsc file. """ - dscuri = buildinput["dscuri"] + dscuri = buildinput["source_package_url"] dscpath = destdir / dscuri.split("/")[-1] # mypy doesn't grok this: assert isinstance(dscpath, pathlib.Path) @@ -147,7 +148,7 @@ def get_dsc(build: JsonObject) -> typing.Iterator[pathlib.Path]: downloaded to a temporary location. """ try: - dscpath = build["input"]["dscpath"] + dscpath = build["input"]["source_package_path"] except KeyError: with tempfile.TemporaryDirectory() as tdir: yield download_dsc(build["input"], pathlib.Path(tdir)) @@ -170,7 +171,7 @@ def make_option(optname: str, value: typing.Optional[str]) -> typing.List[str]: def profile_option(build: JsonObject, optname: str) -> typing.List[str]: """Construct the option for specifying build profiles if required.""" - return make_option(optname, ",".join(build.get("profiles", ()))) + return make_option(optname, ",".join(build.get("build_profiles", ()))) def tar_add(tarobj: tarfile.TarFile, path: pathlib.Path) -> None: """Add the given file as its basename to the tarobj retaining its |