From 557e4c365b4f6742c7c95d458758a72a11331b89 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 9 Aug 2011 13:05:29 +0200 Subject: Also guarding key additions for local configured archives to not fail if no key is supplied. --- scripts/build/lb_chroot_archives | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/build/lb_chroot_archives b/scripts/build/lb_chroot_archives index 7bbbba7f4..c4ff532fb 100755 --- a/scripts/build/lb_chroot_archives +++ b/scripts/build/lb_chroot_archives @@ -477,9 +477,12 @@ EOF for FILE in config/archives/*.key \ config/archives/*.key.chroot do - cp ${FILE} chroot/root - Chroot chroot "apt-key add /root/$(basename ${FILE})" - rm -f chroot/root/$(basename ${FILE}) + if [ -e "${FILE}" ] + then + cp ${FILE} chroot/root + Chroot chroot "apt-key add /root/$(basename ${FILE})" + rm -f chroot/root/$(basename ${FILE}) + fi done fi @@ -806,9 +809,12 @@ EOF for FILE in config/archives/*.key \ config/archives/*.key.binary do - cp ${FILE} chroot/root - Chroot chroot "apt-key add /root/$(basename ${FILE})" - rm -f chroot/root/$(basename ${FILE}) + if [ -e "${FILE}" ] + then + cp ${FILE} chroot/root + Chroot chroot "apt-key add /root/$(basename ${FILE})" + rm -f chroot/root/$(basename ${FILE}) + fi done fi -- cgit v1.2.3