On Sun, May 30, 2010 at 09:01:51AM +1000, Allan McRae wrote:
On 30/05/10 05:44, Nezmer wrote:
If "file -bizL" does not return a supported type. Check if the dist file is recognized by bsdtar and if yes extract from it.
Signed-off-by: Nezmer<git@nezmer.info> ---
bsdtar can recognize many containers and compression algorithms.
lzma is the best compression the GNU guys are using in their dist files.
% file -bizL wget-1.12.tar.lzma application/octet-stream; charset=binary
"file" output is not really useful.
Using lzma can reduce the size of source packages by a good margin.
Is .lzma used by anyone these days? I have seen no GNU projects using it in recent times given has .xz completely taken over as is its successor. There is no point in doing this for a dead format.
I did a fast scan on repo packages that refer to "ftp.gnu.org/gnu" as a source. Apparently most projects still use or used in their latest release gz/bzip2 only. Some projects are starting to use xz(my dummy script counted 11). But automake texinfo libtool and wget used lzma as a modern(ish) compression in their latest releases. Anyway, the idea was not to depend on hard-coded mime types and extensions completely. bsdtar can do way more. Another example which might be as bad as the lzma one is all those AUR PKGBULDS that depend on rpm sources.
Allan