[pbuilder] 01/02: modules: add_additional_aptkeyrings: don't fail if the target keyring file is already presetn, just warn if different
Mattia Rizzolo
mattia at debian.org
Sat Sep 10 10:12:38 UTC 2016
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch master
in repository pbuilder.
commit 105dca63f9e03be7b023c4080e7980093f62acc8
Author: Mattia Rizzolo <mattia at debian.org>
Date: Sat Sep 10 10:11:30 2016 +0000
modules: add_additional_aptkeyrings: don't fail if the target keyring file is already presetn, just warn if different
Otherwise people calling `pbuilder update` twice in a row with the same setting
would get a failure in the second call.
---
pbuilder-modules | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pbuilder-modules b/pbuilder-modules
index 14bcf54..38dccaf 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -806,8 +806,9 @@ function add_additional_aptkeyrings() {
dest="${BUILDPLACE}/etc/apt/trusted.gpg.d/${filename}"
log.i "copying apt key file ${KEY} to ${dest}"
if [ -f "${dest}" ]; then
- log.e "file ${dest} already exists"
- exit 1
+ if cmp -s "${KEY}" "${dest}" ; then
+ log.w "overwriting existing and different keyring"
+ fi
fi
cp "${KEY}" "${dest}"
done
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/pbuilder.git
More information about the Pbuilder-maint
mailing list