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:
Juan RP 2014-10-14 19:16:29 +02:00
parent 1cee26a59f
commit 033c4ed0f5
4 changed files with 1 additions and 44 deletions

View file

@ -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
}

View file

@ -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
}

View file

@ -187,7 +187,6 @@ chroot_handler() {
else
[ -n "$XBPS_CROSS_BUILD" ] && arg="$arg -a $XBPS_CROSS_BUILD"
[ -n "$XBPS_KEEP_ALL" ] && arg="$arg -C"
[ -n "$XBPS_REPO_DELTAS" ] && arg="$arg -D"
[ -n "$NOCOLORS" ] && arg="$arg -L"
[ -n "$XBPS_BUILD_FORCEMODE" ] && arg="$arg -f"
[ -n "$XBPS_MAKEJOBS" ] && arg="$arg -j$XBPS_MAKEJOBS"

View file

@ -116,8 +116,6 @@ Options:
-C Do not remove build directory, automatic dependencies and
package destdir after successful install.
-D Generate repository binary diffs (deltas) via xdelta3.
-f Force building and registering binary packages into the local repository,
even if same version is already registered.
@ -314,11 +312,10 @@ readonly XBPS_MACHINE=$(uname -m)
#
XBPS_OPTIONS=
while getopts "a:CDfgGhH:Ij:Lm:No:r:V" opt; do
while getopts "a:CfgGhH:Ij:Lm:No:r:V" opt; do
case $opt in
a) readonly XBPS_CROSS_BUILD="$OPTARG"; XBPS_OPTIONS+="-a $OPTARG ";;
C) readonly XBPS_KEEP_ALL=1; XBPS_OPTIONS+="-C ";;
D) readonly XBPS_REPO_DELTAS=1; XBPS_OPTIONS+=" -D";;
f) readonly XBPS_BUILD_FORCEMODE=1; XBPS_OPTIONS+="-f ";;
G) readonly XBPS_USE_GIT_REVS=1; XBPS_OPTIONS+="-G ";;
g) readonly XBPS_DEBUG_PKGS=1; XBPS_OPTIONS+="-g ";;