diff options
Diffstat (limited to 'mdbp')
-rw-r--r-- | mdbp/mmdebstrap.py | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/mdbp/mmdebstrap.py b/mdbp/mmdebstrap.py index 6555d3f..65a4856 100644 --- a/mdbp/mmdebstrap.py +++ b/mdbp/mmdebstrap.py @@ -123,12 +123,23 @@ def hook_main(buildjsonfilename: str, chrootname: str) -> None: '-oDebug::pkgDepCache::AutoInstall=1', '-oDebug::BuildDeps=1'] priv_drop(cmd, chroot=chroot, chdir=builddir / subdir) - priv_drop(["dpkg-buildpackage", "-uc", "--host-arch=" + hostarch, - "--build=" + build.get("type", "binary"), - *profile_option(build, "--build-profiles=")], - chroot=chroot, setuid="build", - privnet=not build.get("network") in ("enable", "try-enable"), - chdir=builddir / subdir, env=compute_env(build)) + try: + priv_drop( + [ + "dpkg-buildpackage", + "-uc", + "--host-arch=" + hostarch, + "--build=" + build.get("type", "binary"), + *profile_option(build, "--build-profiles="), + ], + chroot=chroot, + setuid="build", + privnet=not build.get("network") in ("enable", "try-enable"), + chdir=builddir / subdir, + env=compute_env(build), + ) + except subprocess.CalledProcessError as cpe: + sys.exit(cpe.returncode) shutil.rmtree(fullbuilddir / subdir) if build.get("lintian", {}).get("run"): priv_drop([*apt_get, "install", "lintian"], chroot=chroot) |