[elbe-devel] [PATCH 2/3] pbuilder: update repos after entering chroot

Manuel Traut manut at linutronix.de
Wed Apr 17 18:15:15 CEST 2019


chroots apt-cache needs to be updated after entering.
repos might have changed since chroot creation.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/pbuilder.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/elbepack/pbuilder.py b/elbepack/pbuilder.py
index 7985c269..866589e8 100644
--- a/elbepack/pbuilder.py
+++ b/elbepack/pbuilder.py
@@ -101,6 +101,9 @@ def pbuilder_write_repo_hook(builddir, xml):
 
     pbuilder_hook_dir = os.path.join(builddir, "pbuilder", "hooks.d")
 
+    with open(os.path.join(pbuilder_hook_dir, "H10elbe_apt_update"), "w") as f:
+        f.write("#!/bin/sh\napt update\n")
+
     fp = open(os.path.join(pbuilder_hook_dir, "G10elbe_apt_sources"), "w")
 
     if xml.prj is None:
-- 
2.20.1




More information about the elbe-devel mailing list