[pacman-dev] [PATCH] makepkg: allow compression type to be autodetected

Teran McKinney sega01 at gmail.com
Fri Sep 5 07:25:20 EDT 2008

Wouldn't this break package extensions that are not *.tar.{gz,bz2}? I
personally do not like this, as my Arch fork uses .ipkg (I find
pkg.tar.$COMPRESSION very ugly, IMHO). Perhaps tar could simply tar
the archive and a setting in makepkg.conf would allow for any method
of compression? Example:

COMPRESS='gzip -9'

bsdtar -cf "$pkg_file" $comp_files *
$COMPRESS "$pkg_file"

Of course, you would need to deal with renaming it from
${EXTENSION}.gz back to $EXTENSION. Some error checking would be nice

Regarding repo-add, it could simply `tar -xf` and it would be
extracted if `tar` understands that type of compression. It could also
check with `file`, perhaps.

Teran (sega01)

PS: Why is bsdtar used instead of GNU tar?

On Fri, Sep 5, 2008 at 06:03, Xavier <shiningxc at gmail.com> wrote:
> On Fri, Sep 5, 2008 at 3:46 AM, Dan McGee <dan at archlinux.org> wrote:
>> Inspired by commit 7e8f1469c4168875b54956d63884b8583ce99e38, use our given
>> PKGEXT or SRCEXT to determine what method of compression to use on the
>> package we create. If the extension is invalid, this should fall back to
>> creating a non-compressed tar file.
>> Signed-off-by: Dan McGee <dan at archlinux.org>
> Looks nice, and repo-add and pacman could already handle tar.gz and
> tar.bz2 transparently.
> _______________________________________________
> pacman-dev mailing list
> pacman-dev at archlinux.org
> http://archlinux.org/mailman/listinfo/pacman-dev

More information about the pacman-dev mailing list