From 111c0f71c3d4154d2b6694c855f11f0d4b07cb9d Mon Sep 17 00:00:00 2001 From: Ash Milsted Date: Sat, 2 Jun 2007 12:42:36 -0400 Subject: makepkg: fix create_xdelta() and add warning Signed-off-by: Dan McGee --- scripts/makepkg.in | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.in b/scripts/makepkg.in index 0ee9591e..6ae4d8be 100644 --- a/scripts/makepkg.in +++ b/scripts/makepkg.in @@ -760,12 +760,12 @@ create_xdelta() { local pkg_file=$1 local cache_dir="/var/cache/pacman/pkg" # TODO: autoconf me - local old_versions=( $(ls {"$cache_dir","$PKGDEST"}/${pkgname}-*-${CARCH}.${PKGEXT} 2>/dev/null) ) + local old_versions=( $(ls {"$cache_dir","$PKGDEST"}/${pkgname}-*-${CARCH}${PKGEXT} 2>/dev/null) ) # Check to see if we have any old versions to create deltas with local old_file old_version latest_version base_file for old_file in "${old_versions[@]}"; do - old_version=$(basename "${old_file%-$CARCH.$PKGEXT}") + old_version=$(basename "${old_file%-$CARCH$PKGEXT}") old_version=${old_version#$pkgname-} # old_version may include the target package, only use the old versions @@ -776,21 +776,22 @@ create_xdelta() { done if [ "$base_file" != "" ]; then - msg "Making delta from version $latest_version" + msg "$(gettext "Making delta from version %s...")" "$latest_version" local delta_file="$PKGDEST/$pkgname-${old_version}_to_$pkgver-$pkgrel-$CARCH.delta" - # xdelta will decompress base_file & pkg_file into TMP_DIR (or /tmp if TMP_DIR is unset) - # then perform the delta on the resulting tars + # xdelta will decompress base_file & pkg_file into TMP_DIR (or /tmp if + # TMP_DIR is unset) then perform the delta on the resulting tars xdelta delta "$base_file" "$pkg_file" "$delta_file" - # Generate the final gz using xdelta for compression. xdelta will be our common - # denominator compression utility between the packager and the users - # - # makepkg and pacman must use the same compression algorithm or the delta generated - # package may not match, producing md5 checksum errors. + # Generate the final gz using xdelta for compression. xdelta will be our + # common denominator compression utility between the packager and the users + # makepkg and pacman must use the same compression algorithm or the delta + # generated package may not match, producing md5 checksum errors. + msg2 "$(gettext "Recreating package tarball from delta to match md5 signatures")" + msg2 "$(gettext "NOTE: the delta should ONLY be distributed with this tarball")" xdelta patch "$delta_file" "$base_file" "$pkg_file" else - msg "No previous version found, skipping xdelta" + warning "$(gettext "No previous version found, skipping xdelta.")" fi } -- cgit v1.2.3-70-g09d2