[elbe-devel] [PATCH] rfs/cdrom_umount: allow fail of apt keyring removal

Torben Hohn torben.hohn at linutronix.de
Fri Apr 5 17:26:57 CEST 2019


On Fri, Apr 05, 2019 at 05:13:10PM +0200, Manuel Traut wrote:
> If debootstrap from cdrom was done the keys are not in the target.
> Add -f to the keyring removal to not return with an error if the
> keyring doesn't exist.
> 
> Signed-off-by: Manuel Traut <manut at linutronix.de>

Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>

> ---
> 
> this applies on top of the v3 patch about repo key handling.
> 
>  elbepack/rfs.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/elbepack/rfs.py b/elbepack/rfs.py
> index 953aa3a0..cbcfbd90 100644
> --- a/elbepack/rfs.py
> +++ b/elbepack/rfs.py
> @@ -59,9 +59,9 @@ class BuildEnv (object):
>          if self.xml.prj.has("mirror/cdrom"):
>              cdrompath = self.rfs.fname("cdrom")
>              self.log.do('umount "%s"' % cdrompath)
> -            self.log.do("rm %s/etc/apt/trusted.gpg.d/elbe-cdrepo.gpg" %
> +            self.log.do("rm -f %s/etc/apt/trusted.gpg.d/elbe-cdrepo.gpg" %
>                          self.path)
> -            self.log.do("rm %s/etc/apt/trusted.gpg.d/elbe-cdtargetrepo.gpg" %
> +            self.log.do("rm -f %s/etc/apt/trusted.gpg.d/elbe-cdtargetrepo.gpg" %
>                          self.path)
>  
>      def cdrom_mount(self):
> -- 
> 2.20.1
> 

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20190405/28583089/attachment.sig>


More information about the elbe-devel mailing list