[pacman-dev] [PATCH] makepkg: Fix xz extraction

Xavier shiningxc at gmail.com
Tue Aug 4 18:32:29 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 >
> file).
>
>
> 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.
>
> [1] http://www.mail-archive.com/bug-gzip@gnu.org/msg00039.html
> [2] 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.


More information about the pacman-dev mailing list