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

Manuel Traut manut at linutronix.de
Fri Apr 5 17:13:10 CEST 2019


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>
---

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




More information about the elbe-devel mailing list