From 234a4fd6851e0831188bcb3eff7d13ee9156607f Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 14 Aug 2014 08:56:48 +0200 Subject: [PATCH] hooks/xdelta: use silent output; those warnings are too noisy. --- common/hooks/post-pkg/01-xdelta_repolist.sh | 10 ++++------ common/hooks/pre-pkg/01-xdelta_repolist.sh | 3 +-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/common/hooks/post-pkg/01-xdelta_repolist.sh b/common/hooks/post-pkg/01-xdelta_repolist.sh index cdf34ce7207..26fb31aee5a 100644 --- a/common/hooks/post-pkg/01-xdelta_repolist.sh +++ b/common/hooks/post-pkg/01-xdelta_repolist.sh @@ -1,4 +1,4 @@ -# This hook generates vcdiffs +# This hook generates vcdiffs for repository data. hook() { type -P xdelta3 > /dev/null || return 0 @@ -9,20 +9,18 @@ hook() { if ! cmp -s "${newfile}" "${oldfile}"; then newdiff="${newfile}.${chk}.vcdiff" - xdelta3 -f -e -s "${oldfile}" "${newfile}" "${newdiff}" + xdelta3 -q -f -e -s "${oldfile}" "${newfile}" "${newdiff}" for diff in ${newfile}.*.vcdiff; do [ "${diff}" = "${newdiff}" ] && continue; cp -- "${diff}" "${diff}.tmp" - xdelta3 -f merge -m "${diff}.tmp" "${newdiff}" "${diff}" + xdelta3 -q -f merge -m "${diff}.tmp" "${newdiff}" "${diff}" rm -- "${diff}.tmp" done fi # generate an empty diff to the new file newchk=`sha256sum ${newfile} | awk '{ print $1 }'` - xdelta3 -f -e -s "${newfile}" "${newfile}" \ - "${newfile}.${newchk}.vcdiff" - + xdelta3 -q -f -e -s "${newfile}" "${newfile}" "${newfile}.${newchk}.vcdiff" rm -- "${oldfile}" done } diff --git a/common/hooks/pre-pkg/01-xdelta_repolist.sh b/common/hooks/pre-pkg/01-xdelta_repolist.sh index b67ebf17a66..9369fe91ab7 100644 --- a/common/hooks/pre-pkg/01-xdelta_repolist.sh +++ b/common/hooks/pre-pkg/01-xdelta_repolist.sh @@ -3,10 +3,9 @@ hook() { type -P xdelta3 > /dev/null || return 0 - env # create links to preserve old versions of repodata find $XBPS_REPOSITORY -name "${XBPS_TARGET_MACHINE}-repodata" | while read; do - rm "${REPLY}.genVcdiff" || true + ( rm "${REPLY}.genVcdiff" 2>/dev/null ) || true cp "${REPLY}" "${REPLY}.genVcdiff" done }