From 0f20ab1139247ebff6267d4502d1f4f11dbd4ea7 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Wed, 13 Aug 2014 22:30:51 +0200 Subject: [PATCH] common/hooks: delta creation: only generate own delta for own XBPS_TARGET_MACHINE --- common/hooks/post-pkg/01-xdelta_repolist.sh | 2 +- common/hooks/pre-pkg/01-xdelta_repolist.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/hooks/post-pkg/01-xdelta_repolist.sh b/common/hooks/post-pkg/01-xdelta_repolist.sh index 5d2fcd5368c..cdf34ce7207 100644 --- a/common/hooks/post-pkg/01-xdelta_repolist.sh +++ b/common/hooks/post-pkg/01-xdelta_repolist.sh @@ -3,7 +3,7 @@ hook() { type -P xdelta3 > /dev/null || return 0 - find $XBPS_REPOSITORY -name '*.genVcdiff' | xargs -r sha256sum | \ + find $XBPS_REPOSITORY -name "${XBPS_TARGET_MACHINE}-repodata.genVcdiff" | xargs -r sha256sum | \ while read chk oldfile; do newfile=${oldfile/.genVcdiff/} diff --git a/common/hooks/pre-pkg/01-xdelta_repolist.sh b/common/hooks/pre-pkg/01-xdelta_repolist.sh index 9c73c3e057f..b67ebf17a66 100644 --- a/common/hooks/pre-pkg/01-xdelta_repolist.sh +++ b/common/hooks/pre-pkg/01-xdelta_repolist.sh @@ -3,9 +3,10 @@ hook() { type -P xdelta3 > /dev/null || return 0 + env # create links to preserve old versions of repodata - find $XBPS_REPOSITORY -name '*-repodata' | while read; do - rm "${REPLY}.genVcdiff" + find $XBPS_REPOSITORY -name "${XBPS_TARGET_MACHINE}-repodata" | while read; do + rm "${REPLY}.genVcdiff" || true cp "${REPLY}" "${REPLY}.genVcdiff" done }