[pacman-dev] Fwd: [Arch Linux] patch for bacman from pacman-contrib package
Dan McGee
dpmcgee at gmail.com
Sat Aug 21 21:44:23 EDT 2010
I would agree.
On Saturday, August 21, 2010, Allan McRae <allan at archlinux.org> wrote:
> Forwarding to the pacman-dev list.
>
> I'd prefer some copying of the code we use in makepkg to decide how to compress a package based on PKGEXT.
>
> Alla
>
> -------- Original Message --------
> Subject: [Arch Linux] patch for bacman from pacman-contrib package
> Date: Sat, 21 Aug 2010 11:58:17 +1000
> From: Nelson Chan <khcha.n.el at gmail.com>
> To: allan at archlinux.org
>
>
>
> originally, bacman doesn't catch up with current .pkg.tar.xz package format
> it produces a package named according /etc/makepkg.conf (e.g. *.pkg.tar.xz)
> but it fact it created a .gz format instead of xz
>
> Package : pacman-contrib (version 3.4.0-1)
> Component: /usr/bin/bacman (version 0.2.1)
>
> ---
> Nelson Chan
>
>
>
> here is the patch:
>
> --- bacman.orig 2010-08-21 00:15:43.480000752 +1000
> +++ bacman 2010-08-21 00:22:20.440001311 +1000
> @@ -87,7 +87,7 @@
>
> pkg_arch=${CARCH:-'unknown'}
> pkg_dest="${PKGDEST:-$PWD}"
> -pkg_ext=${PKGEXT:-'.pkg.tar.gz'}
> +pkg_ext=${PKGEXT}
> pkg_pkger=${PACKAGER:-'Unknown Packager'}
>
> pkg_name="$1"
> @@ -266,7 +266,15 @@
> echo "Generating the package..."
>
> ret=0
> -bsdtar -czf "$pkg_dest/$pkg_namver-$pkg_arch$pkg_ext" $(ls -A) || ret=$?
> +if [[ $pkg_ext == ".pkg.tar.xz" ]]; then
> + tar -cJf "$pkg_dest/$pkg_namver-$pkg_arch.pkg.tar.xz" $(ls -A) ||
> ret=$?
> +elif [[ $pkg_ext == ".pkg.tar.bz2" ]]; then
> + bsdtar -cyf "$pkg_dest/$pkg_namver-$pkg_arch.pkg.tar.bz2" $(ls -A)
> || ret=$?
> +else
> + bsdtar -czf "$pkg_dest/$pkg_namver-$pkg_arch.pkg.tar.gz" $(ls -A)
> || ret=$?
> +fi
> +
> +
> if [ $ret -ne 0 ]; then
> echo "ERROR: unable to write package to $pkg_dest"
> echo " Maybe the disk is full or you do not have write access"
>
>
>
>
>
>
More information about the pacman-dev
mailing list