From 033c4ed0f55334ad19cf17852da8daf7ff80f135 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 14 Oct 2014 19:16:29 +0200 Subject: [PATCH] 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 --- common/hooks/post-pkg/01-xdelta_repolist.sh | 27 --------------------- common/hooks/pre-pkg/01-xdelta_repolist.sh | 12 --------- common/xbps-src/shutils/chroot.sh | 1 - xbps-src | 5 +--- 4 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 common/hooks/post-pkg/01-xdelta_repolist.sh delete mode 100644 common/hooks/pre-pkg/01-xdelta_repolist.sh diff --git a/common/hooks/post-pkg/01-xdelta_repolist.sh b/common/hooks/post-pkg/01-xdelta_repolist.sh deleted file mode 100644 index 09ad59f3fd..0000000000 --- a/common/hooks/post-pkg/01-xdelta_repolist.sh +++ /dev/null @@ -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 -} diff --git a/common/hooks/pre-pkg/01-xdelta_repolist.sh b/common/hooks/pre-pkg/01-xdelta_repolist.sh deleted file mode 100644 index 218a468857..0000000000 --- a/common/hooks/pre-pkg/01-xdelta_repolist.sh +++ /dev/null @@ -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 -} diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh index 2aa18fa972..1e968e05dc 100644 --- a/common/xbps-src/shutils/chroot.sh +++ b/common/xbps-src/shutils/chroot.sh @@ -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" diff --git a/xbps-src b/xbps-src index 51451fba01..29602c166c 100755 --- a/xbps-src +++ b/xbps-src @@ -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 ";;