summaryrefslogtreecommitdiff
path: root/mdbp
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2021-07-06 14:05:25 +0200
committerHelmut Grohne <helmut@subdivi.de>2021-07-06 14:05:25 +0200
commit2ec38bcbbe0d17d699e6b58e6afc0c407d847f1c (patch)
treec91f323ed0f2fe9dab24caab47816a7dd3cb6915 /mdbp
parentfa06dfa5575841bb60dd83bc46426f1a7d737b9b (diff)
downloadmdbp-2ec38bcbbe0d17d699e6b58e6afc0c407d847f1c.tar.gz
pbuilder: implement support for build_path
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"