xbps-src: remove WIP repo delta support.
- it never worked correctly - it's WIP and looks like it will be stalled forever - won't be necessary anymore with xbps-0.42
This commit is contained in:
parent
1cee26a59f
commit
033c4ed0f5
4 changed files with 1 additions and 44 deletions
|
@ -1,27 +0,0 @@
|
|||
# This hook generates vcdiffs for repository data.
|
||||
|
||||
hook() {
|
||||
[ -z "$XBPS_REPO_DELTAS" ] && return 0
|
||||
type -P xdelta3 > /dev/null || return 0
|
||||
|
||||
find $XBPS_REPOSITORY -name "${XBPS_TARGET_MACHINE}-repodata.genVcdiff" | xargs -r sha256sum | \
|
||||
while read chk oldfile; do
|
||||
newfile=${oldfile/.genVcdiff/}
|
||||
|
||||
if ! cmp -s "${newfile}" "${oldfile}"; then
|
||||
newdiff="${newfile}.${chk}.vcdiff"
|
||||
xdelta3 -q -f -e -s "${oldfile}" "${newfile}" "${newdiff}"
|
||||
for diff in ${newfile}.*.vcdiff; do
|
||||
[ "${diff}" = "${newdiff}" ] && continue;
|
||||
cp -- "${diff}" "${diff}.tmp"
|
||||
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 -q -f -e -s "${newfile}" "${newfile}" "${newfile}.${newchk}.vcdiff"
|
||||
rm -- "${oldfile}"
|
||||
done
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
# this hook marks files which are about to change for generating vcdiffs
|
||||
|
||||
hook() {
|
||||
[ -z "$XBPS_REPO_DELTAS" ] && return 0
|
||||
type -P xdelta3 > /dev/null || return 0
|
||||
|
||||
# create links to preserve old versions of repodata
|
||||
find $XBPS_REPOSITORY -name "${XBPS_TARGET_MACHINE}-repodata" | while read; do
|
||||
( rm "${REPLY}.genVcdiff" 2>/dev/null ) || true
|
||||
cp "${REPLY}" "${REPLY}.genVcdiff"
|
||||
done
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue