summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mdbp/mmdebstrap.py10
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.