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

Torben Hohn torben.hohn at linutronix.de
Wed Aug 7 10:34:05 CEST 2019


On Thu, Jul 18, 2019 at 04:02:00PM +0200, dion at linutronix.de wrote:
> 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 ..

no. i am pretty sure, that setting the array to empty would also yield
surprises. 

please remove the 2 lines question.

> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>

then:

Reviewed-by: Torben Hohn <torben.hohn 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
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner



More information about the elbe-devel mailing list