[elbe-devel] [PATCH] Fix Debian repo key import to chroot directory

Manuel Traut manuel.traut at linutronix.de
Mon Jun 12 15:47:50 CEST 2017


..finally applied. Thx!

> Fix commit fd91ed93796db5cd0986762561b747b15b758071
> 
> Signed-off-by: Philipp Arras <philipp.arras at linutronix.de>
> ---
>  elbepack/rfs.py | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/elbepack/rfs.py b/elbepack/rfs.py
> index cd24d0f..5b373a6 100644
> --- a/elbepack/rfs.py
> +++ b/elbepack/rfs.py
> @@ -20,6 +20,7 @@ import apt_pkg
>  import os
>  import sys
>  import urlparse
> +import urllib2
>  
>  import elbepack
>  
> @@ -195,10 +196,11 @@ class BuildEnv ():
>                      l = url.text('key').strip()    # URL to key
>                      name = l.split('/')[-1]        # Filename of key
>  
> -                    # Download key and add it to Debian keyring
> -                    self.log.chroot(self.rfs.path, 'wget %s' % l )
> -                    self.log.chroot(self.rfs.path, 'apt-key add %s' % name )
> -                    self.log.chroot(self.rfs.path, 'rm %s' % name)
> +                    myKey = urllib2.urlopen(l).read()
> +                    self.log.do('echo "%s" > %s' % (myKey, self.rfs.fname("tmp/key.pub")))
> +                    with self.rfs:
> +                        self.log.chroot(self.rfs.path, 'apt-key add /tmp/key.pub' )
> +                    self.log.do('rm -f %s' % self.rfs.fname("tmp/key.pub"))
>  
>      def initialize_dirs (self, build_sources=False):
>          mirror = self.xml.create_apt_sources_list (build_sources=build_sources)
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel




More information about the elbe-devel mailing list