diff options
author | Helmut Grohne <helmut@subdivi.de> | 2021-04-23 12:35:43 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2021-04-23 12:35:43 +0200 |
commit | 1fc8b5604778c46a8f867827077034f4660b74f2 (patch) | |
tree | 438fca7e2b7595b248f7925ec6ee583efdaf3d01 | |
parent | 3cf6fa1cc6e50fffbc75add3b5f55a7c91b42517 (diff) | |
download | mdbp-1fc8b5604778c46a8f867827077034f4660b74f2.tar.gz |
remove redundant values from schema
The bd-uninstallable-explainer value null is equivalent to skipping the
option and thus dropped. The network value "undefined" is equivalent to
skipping the option and thus dropped.
Reported-by: David Kalnischkies <donkult@debian.org>
-rw-r--r-- | mdbp/build_schema.json | 10 | ||||
-rw-r--r-- | mdbp/pbuilder.py | 4 | ||||
-rw-r--r-- | mdbp/sbuild.py | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/mdbp/build_schema.json b/mdbp/build_schema.json index baa38ef..7997f2e 100644 --- a/mdbp/build_schema.json +++ b/mdbp/build_schema.json @@ -106,14 +106,12 @@ } }, "bd-uninstallable-explainer": { - "enum": [ null, "apt", "dose3" ], - "default": null, - "description": "when installing Build-Depends fails, an explainer can be used to give details" + "enum": [ "apt", "dose3" ], + "description": "When installing Build-Depends fails, an explainer can be used to give details. Without this property, no explainer is run." }, "network": { - "enum": [ "enable", "disable", "try-disable", "try-enable", "undefined" ], - "default": "undefined", - "description": "whether the build should be able to access the internet" + "enum": [ "enable", "disable", "try-disable", "try-enable" ], + "description": "Decide whether the build should be able to access the internet. Without this property, the backend picks its own default. A try-prefixed value does not cause a failure when the request cannot be fulfilled." }, "output": { "type": "object", diff --git a/mdbp/pbuilder.py b/mdbp/pbuilder.py index 07dcac5..e59f262 100644 --- a/mdbp/pbuilder.py +++ b/mdbp/pbuilder.py @@ -20,9 +20,9 @@ def main() -> None: if build.get("lintian", {}).get("run"): raise ValueError("running lintian not supported") - if build.get("bd-uinstallable-explainer"): + if "bd-uninstallable-explainer" in build: raise ValueError("bd-uninstallable-explainer %r not supported" % - build.get("bd-uinstallable-explainer")) + build["bd-uinstallable-explainer"]) if build.get("buildpath"): raise ValueError("buildpath not supported") if build["distribution"] in ("sid", "unstable"): diff --git a/mdbp/sbuild.py b/mdbp/sbuild.py index d2bf2fe..aecc037 100644 --- a/mdbp/sbuild.py +++ b/mdbp/sbuild.py @@ -25,7 +25,7 @@ def main() -> None: "--no-arch-any" if build.get("type") == "all" else "--arch-any", "--no-arch-all" if build.get("type") == "any" else "--arch-all", "--bd-uninstallable-explainer=" + - (build.get("bd-uninstallable-explainer") or ""), + build.get("bd-uninstallable-explainer", ""), "--run-lintian" if build.get("lintian", {}).get("run") else "--no-run-lintian", ] |