diff options
author | Helmut Grohne <helmut@subdivi.de> | 2021-04-18 20:36:45 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2021-04-18 20:36:45 +0200 |
commit | de390ea006643985eb89697b442ecf4f9d595ea8 (patch) | |
tree | 800151c69293b431d94acf7f0e35fd49c7670045 /mdbp/mmdebstrap.py | |
parent | b3612b53bdb52beb57e715b7f4947eeccdbdd3fc (diff) | |
download | mdbp-de390ea006643985eb89697b442ecf4f9d595ea8.tar.gz |
mmdebstrap: add support for lintian
Diffstat (limited to 'mdbp/mmdebstrap.py')
-rw-r--r-- | mdbp/mmdebstrap.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mdbp/mmdebstrap.py b/mdbp/mmdebstrap.py index df96e47..c4a52ef 100644 --- a/mdbp/mmdebstrap.py +++ b/mdbp/mmdebstrap.py @@ -58,8 +58,6 @@ def main() -> None: args = parser.parse_args() build = args.buildjson - if build.get("lintian", {}).get("run"): - raise ValueError("running lintian not supported") if build.get("bd-uninstallable-explainer") not in (None, "apt"): raise ValueError("bd-uinstallable-explainer %r not supported" % build.get("bd-uinstallable-explainer")) @@ -116,6 +114,14 @@ def main() -> None: chdir=str(buildpath), env=compute_env(build))) script.write("%s\n" % priv_drop(["rm", "-R", str(buildpath)], chroot=True)) + if build.get("lintian", {}).get("run"): + cmd = ["lintian", *build["lintian"].get("options", ()), + "%s_%s.changes" % (dscpath.stem, buildarch)] + script.write("%s\n%s\n" % + (priv_drop(["apt-get", "install", "--yes", "lintian"], + chroot=True), + priv_drop(cmd, chroot=True, setuid="build", + chdir=str(buildpath.parent)))) # Only close the file object, script.close would delete it. # Unfortunatly, mypy doesn't grok the indirection and thinks that # script already is the file. |