sstephenson/ruby-build — pull request #357 by hdgarrood (2013-05-14 19:14:35+00:00)
Title: Specify compression formats in definition files

This is another method for fixing issues like #344 (where the downloaded
file is tar.bz2 but we're invoking `tar xzvf`).

Instead of relying on tar to do the compression format detection (as I
have in the other PR), this commit adds an extra optional argument to
install_package for specifying the filename extension. If omitted,
'tar.gz' is assumed. Currently only .tar.gz and .tar.bz2 are supported,
but it would be easy to add more -- see the new `extract` function.

I prefer this solution because it will work with GNU tar before version
1.15. I'm not sure if bsdtar implementations do the compression format
detection that newer GNU ones do, and if they have, how long they've
been doing so...

I also prefer it because downloaded tarballs are now given the correct
file extension (assuming the file definition is correct). So if
topaz-dev is downloaded but fails to install, manually debugging is
slightly less confusing.

Hopefully a more robust approach than #355 to solving #344.