[elbe-devel] [PATCH 1/1] Remove --force-check-gpg from DEBOOTSTRAPOPTS when <noauth>.

dion at linutronix.de dion at linutronix.de
Thu Jul 18 16:02:00 CEST 2019


From: Olivier Dion <dion at linutronix.de>

Nasty behavior of pbuilder that add --force-check-gpg by default in
the DEBOOSTRAPOPTS env variable.

This should remove it no matter what when <noauth> is set.  It's very
ugly, but the only way I know to remove an element in a bash array.

Maybe we could set DEBOOTSTAPOPTS to the empty list at the top of
pbuilderrc?  This way no supprise in the future ..

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/pbuilder.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/elbepack/pbuilder.py b/elbepack/pbuilder.py
index b38136de..6bc2945f 100644
--- a/elbepack/pbuilder.py
+++ b/elbepack/pbuilder.py
@@ -50,6 +50,7 @@ def pbuilder_write_config(builddir, xml, _log):
     if xml.prj.has('noauth'):
         fp.write(
             'DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--no-check-gpg")\n')
+        fp.write("""for i in "${!DEBOOTSTRAPOPTS[@]}"; do if [[ ${DEBOOTSTRAPOPTS[i]} == "--force-check-gpg" ]]; then unset 'DEBOOTSTRAPOPTS[i]'; break; fi done\n""")
         fp.write('export ALLOWUNTRUSTED="yes"\n')
 
     # aptitude segfaults with armhf changeroots, great! :)
-- 
2.11.0




More information about the elbe-devel mailing list