From de390ea006643985eb89697b442ecf4f9d595ea8 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sun, 18 Apr 2021 20:36:45 +0200 Subject: mmdebstrap: add support for lintian --- mdbp/mmdebstrap.py | 10 ++++++++-- 1 file 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. -- cgit v1.2.3