﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
1025	Extraction Fail	lfs@…	alfs-log@…	"Hi,
i had Problems with nALFS on 2 Packages ""expect"" and ""bzip2"".

>bunzip2 -dc /tools/packages-6.1-testing-4532/bzip2-1.0.2.tar.bz2 | tar x 
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Read 9728 bytes from -
tar: Error exit delayed from previous errors

>tar xjf /tools/packages-6.1-testing-4532/bzip2-1.0.2.tar.bz2 -> WORK

tar (GNU tar) 1.14.91
bzip2, a block-sorting file compressor.  Version 1.0.2, 30-Dec-2001.
gzip 1.3.5

My patch is now
static int unpack_archive(const char *archive) {
        char *decompressor = NULL;
        char *unpacker = NULL;
        char *command = NULL;
        int status = -1;
+        compression_type_e      comp = get_compression_type(archive);
+        archive_format_e        arch = get_archive_format  (archive);
+        if (arch == ARCHIVE_TAR) {
+                const char *cmd = NULL;
+                if (comp == COMPRESS_GZ ) cmd = ""tar xzf %s"";
+                if (comp == COMPRESS_BZ2) cmd = ""tar xjf %s"";
+                if (cmd != NULL) {
+                        Nprint_h(""Unpacking tar x?f %s.."", archive);
+                        status = execute_command(cmd, archive);
+                        return status;
+                        }
+                }
+        decompressor = alloc_decompress_command(comp);
+        unpacker     = alloc_unpack_command    (arch);
-        decompressor = alloc_decompress_command(get_compression_type(archive));
-        unpacker     = alloc_unpack_command    (get_archive_format  (archive));"	defect	closed	highest		nALFS - Back End (XML Handlers)	1.2.4	blocker	worksforme		
