summaryrefslogtreecommitdiff
path: root/mdbp/pbuilder.py
diff options
context:
space:
mode:
Diffstat (limited to 'mdbp/pbuilder.py')
-rw-r--r--mdbp/pbuilder.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/mdbp/pbuilder.py b/mdbp/pbuilder.py
index 8e2556d..a5f734a 100644
--- a/mdbp/pbuilder.py
+++ b/mdbp/pbuilder.py
@@ -18,6 +18,7 @@ def main() -> None:
args = parser.parse_args()
build = args.buildjson
+ enablelog = build["output"].get("log", True)
if build.get("lintian", {}).get("run"):
raise ValueError("running lintian not supported")
if "bd-uninstallable-explainer" in build:
@@ -55,9 +56,15 @@ def main() -> None:
build.get("type", "binary")])
cmd.extend(profile_option(build, "--profiles"))
cmd.extend(["--buildresult", build["output"]["directory"]])
+ if not enablelog:
+ cmd.extend(["--loglevel", "E"])
with get_dsc(build) as dscpath:
cmd.append(str(dscpath))
- proc = subprocess.Popen(cmd, env=compute_env(build))
+ proc = subprocess.Popen(cmd, env=compute_env(build),
+ stdout=None if enablelog
+ else subprocess.DEVNULL,
+ stderr=subprocess.STDOUT if enablelog
+ else subprocess.DEVNULL)
sys.exit(proc.wait())
if __name__ == "__main__":