The create-xdelta script can be used instead.

Signed-off-by: Xavier Chantry <[email protected]>
---
 doc/makepkg.conf.5.txt |    7 +-----
 etc/makepkg.conf.in    |    5 +--
 scripts/makepkg.sh.in  |   50 ------------------------------------------------
 3 files changed, 3 insertions(+), 59 deletions(-)

diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt
index 04fe2bb..704dccc 100644
--- a/doc/makepkg.conf.5.txt
+++ b/doc/makepkg.conf.5.txt
@@ -70,7 +70,7 @@ Options
        This is often used to set the number of jobs used, for example, `-j2`.
        Other flags that make accepts can also be passed.
 
-**BUILDENV=(**fakeroot !distcc color !ccache !xdelta**)**::
+**BUILDENV=(**fakeroot !distcc color !ccache**)**::
        This array contains options that affect the build environment, the 
defaults
        are shown here. All options should always be left in the array; to 
enable
        or disable an option simply remove or place an ``!'' at the front of the
@@ -93,11 +93,6 @@ Options
                be disabled for individual packages by placing `!ccache` in the
                PKGBUILD options array.
 
-       *xdelta*;;
-               Generate an xdelta binary patch from previous to current 
package. The
-               previous package must be available in the makepkg cache 
directory for
-               this to occur.
-
 **DISTCC_HOSTS=**"host1 ..."::
        If using DistCC, this is used to specify a space-delimited list of hosts
        running in the DistCC cluster. In addition, you will want to modify your
diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in
index d811867..76b9eca 100644
--- a/etc/makepkg.conf.in
+++ b/etc/makepkg.conf.in
@@ -39,16 +39,15 @@ CXXFLAGS="@carchfl...@-mtune=generic -O2 -pipe"
 # BUILD ENVIRONMENT
 #########################################################################
 #
-# Defaults: BUILDENV=(fakeroot !distcc color !ccache !xdelta)
+# Defaults: BUILDENV=(fakeroot !distcc color !ccache)
 #  A negated environment option will do the opposite of the comments below.
 #
 #-- fakeroot: Allow building packages as a non-root user
 #-- distcc:   Use the Distributed C/C++/ObjC compiler
 #-- color:    Colorize output messages
 #-- ccache:   Use ccache to cache compilation
-#-- xdelta:   Generate delta patch from previous to current package
 #
-BUILDENV=(fakeroot !distcc color !ccache !xdelta)
+BUILDENV=(fakeroot !distcc color !ccache)
 #
 #-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
 #-- specify a space-delimited list of hosts running in the DistCC cluster.
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 9e0f249..95a2f3e 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -982,54 +982,6 @@ create_package() {
        shopt -u nullglob
 }
 
-create_xdelta() {
-       if [ "$(check_buildenv xdelta)" != "y" ]; then
-               return
-       elif [ ! "$(type -p xdelta3)" ]; then
-               error "$(gettext "Cannot find the xdelta3 binary! Is xdelta3 
installed?")"
-               return
-       fi
-
-       local pkg_file=$1
-       local cache_dir="/var/cache/pacman/pkg" # TODO: autoconf me
-       local pkginfo="$(mktemp "$startdir"/xdelta-pkginfo.XXXXXXXXX)"
-
-       local old_file old_version
-       for old_file in $(ls 
{"$cache_dir","$PKGDEST"}/${pkgname}-*-*{,-$CARCH}$PKGEXT 2>/dev/null); do
-               bsdtar -xOf "$old_file" .PKGINFO > "$pkginfo" || continue
-               if [ "$(cat "$pkginfo" | grep '^pkgname = ')" != "pkgname = 
$pkgname" ]; then
-                       continue # Package name does not match.
-               elif [ "$(cat "$pkginfo" | grep '^arch = ')" != "arch = $CARCH" 
] ; then
-                       continue # Not same arch.
-               fi
-
-               old_version="$(cat "$pkginfo" | grep '^pkgver = ' | sed 
's/^pkgver = //')"
-
-               # old_version may include the target package, only use the old 
versions
-               local vercmp=$(vercmp "$old_version" "$latest_version")
-               if [ "$old_version" != "$pkgver-$pkgrel" -a $vercmp -gt 0 ]; 
then
-                       local latest_version=$old_version
-                       local base_file=$old_file
-               fi
-       done
-
-       rm -f "$pkginfo"
-
-       if [ -n "$base_file" ]; then
-               msg "$(gettext "Making delta from version %s...")" 
"$latest_version"
-               local 
delta_file="$PKGDEST/$pkgname-${latest_version}_to_$pkgver-$pkgrel-$CARCH.delta"
-               local ret=0
-
-               xdelta3 -s "$base_file" "$pkg_file" "$delta_file" || ret=$?
-
-               if [ $ret -ne 0 ]; then
-                       warning "$(gettext "Delta was not able to be created.")"
-               fi
-       else
-               warning "$(gettext "No previous version found, skipping 
xdelta.")"
-       fi
-}
-
 create_srcpackage() {
        cd "$startdir"
        if [ "$SOURCEONLY" -eq 2 ]; then
@@ -1794,8 +1746,6 @@ else
                        fakeroot -- $0 -F $ARGLIST || exit $?
                fi
        fi
-
-       create_xdelta 
"$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}"
 fi
 
 msg "$(gettext "Finished making: %s")" "$pkgname $pkgver-$pkgrel $CARCH 
($(date))"
-- 
1.6.1.3

_______________________________________________
pacman-dev mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/pacman-dev

Reply via email to