summaryrefslogtreecommitdiff
path: root/mdbp
diff options
context:
space:
mode:
Diffstat (limited to 'mdbp')
-rw-r--r--mdbp/pbuilder.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mdbp/pbuilder.py b/mdbp/pbuilder.py
index 052dce8..1c1782a 100644
--- a/mdbp/pbuilder.py
+++ b/mdbp/pbuilder.py
@@ -44,8 +44,6 @@ def main() -> None:
if "bd-uninstallable-explainer" in build:
raise ValueError("bd-uninstallable-explainer %r not supported" %
build["bd-uinstallable-explainer"])
- if build.get("build_path"):
- raise ValueError("build_path not supported")
if build["distribution"] in ("sid", "unstable"):
basetgz = None
else:
@@ -80,6 +78,11 @@ def main() -> None:
cmd.extend(["--loglevel", "E"])
apt_get = ["apt-get", "-oAPT::Keep-Downloaded-Path=false", "--yes"]
with contextlib.ExitStack() as stack:
+ if build.get("build_path"):
+ rcfile = stack.enter_context(tempfile.NamedTemporaryFile("w"))
+ rcfile.write("BUILDDIR=%s\n" % shlex.quote(build["build_path"]))
+ rcfile.flush()
+ cmd.extend(["--configfile", rcfile.name])
hookdir = pathlib.Path(
stack.enter_context(tempfile.TemporaryDirectory()))
hook = hookdir / "D50aptupdate"