[pacman-dev] [PATCH] makepkg: Fix xz extraction
cedric at gmx.ca
Wed Aug 5 06:51:55 EDT 2009
> On Tue, Aug 4, 2009 at 11:51 PM, Cedric Staniewski<cedric at gmx.ca> wrote:
>> Unfortunately, gzip/gunzip do not have something like a -k option and it
>> seems that there are no plans to add one [1,2]. The only possibilities
>> are recreating the link or decompressing to stdout (gzip -dc file.gz >
>> By the way, another issue might be the use of file, because
>> decompressing via gzip/bzip2/xz without the -c option relies on the suffix.
>>  http://firstname.lastname@example.org/msg00039.html
>>  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=240539
> yeah, I realized after writing my mail that gzip didn't have -k. crazy..
> I wanted to go the lazy way and only fix bzip2 and xz, and not worry
> about gzip for now.
> About file type vs file extension : I don't see what we could do if
> the file extension is wrong. It is not possible to compute a
> destination file, so we can only fail there. And this is what should
> happen currently.
> However, if we want to fix the issue with gzip -dc file.gz > file , we
> probably need to check the extension, before trying to strip it.
> And if the extension does not match, we would probably fail here too.
> pacman-dev mailing list
> pacman-dev at archlinux.org
I would prefer skipping files with unsuitable extensions rather than
failing and forcing to add these files to noextract.
A fairly robust patch (gzip suffixes -gz, -z, _z are not supported
though) can be found in the following mails. It is based on master, not
on the first patch of this thread.
More information about the pacman-dev