summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh Milsted <thatistosayiseenem@gawab.com>2007-06-02 12:42:36 -0400
committerDan McGee <dan@archlinux.org>2007-06-02 13:44:54 -0400
commit111c0f71c3d4154d2b6694c855f11f0d4b07cb9d (patch)
treeb0311c9b10024d076f0e103b1ec6c26016f631e6
parent40af40da4cd9c35b469b7076de5a7c6a3f553327 (diff)
makepkg: fix create_xdelta() and add warning
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/makepkg.in23
1 files changed, 12 insertions, 11 deletions
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
}