1 |
spatz 09/12/31 16:22:52 |
2 |
|
3 |
Added: pigz-2.1.5-gunzip-compat.patch |
4 |
pigz-2.1.5-decode-symlinks-to-stdout.patch |
5 |
Log: |
6 |
Apply patches to decode symlinks to stdout and decompress when called as gunzip, add symlink USE flag to replace g{,un}zip. Thanks to Holger Hoffstätte <holger.hoffstaette@××××××××××.com>, bug 294752. |
7 |
(Portage version: 2.2_rc61/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-arch/pigz/files/pigz-2.1.5-gunzip-compat.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-arch/pigz/files/pigz-2.1.5-gunzip-compat.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-arch/pigz/files/pigz-2.1.5-gunzip-compat.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: pigz-2.1.5-gunzip-compat.patch |
16 |
=================================================================== |
17 |
--- ../pigz-2.1.5/pigz.c 2009-07-20 04:42:00.000000000 +0200 |
18 |
+++ pigz.c 2009-11-24 10:50:13.000000000 +0100 |
19 |
@@ -3075,9 +3075,17 @@ |
20 |
if (argc < 2 && isatty(1)) |
21 |
help(); |
22 |
|
23 |
- /* decompress if named "unpigz" */ |
24 |
+ /* find program name */ |
25 |
p = strrchr(argv[0], '/'); |
26 |
- if (strcmp(p == NULL ? argv[0] : p + 1, "unpigz") == 0) |
27 |
+ if (p == NULL) { |
28 |
+ p = argv[0]; |
29 |
+ } |
30 |
+ else { |
31 |
+ ++p; |
32 |
+ } |
33 |
+ |
34 |
+ /* decompress if named "unpigz" or "gunzip" */ |
35 |
+ if ((strcmp(p, "unpigz") == 0) || (strcmp(p, "gunzip") == 0)) |
36 |
decode = 1, headis = 0; |
37 |
|
38 |
/* process command-line arguments */ |
39 |
|
40 |
|
41 |
|
42 |
1.1 app-arch/pigz/files/pigz-2.1.5-decode-symlinks-to-stdout.patch |
43 |
|
44 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-arch/pigz/files/pigz-2.1.5-decode-symlinks-to-stdout.patch?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-arch/pigz/files/pigz-2.1.5-decode-symlinks-to-stdout.patch?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: pigz-2.1.5-decode-symlinks-to-stdout.patch |
48 |
=================================================================== |
49 |
diff -u pigz-2.1.5/pigz.c pigz-2.1.5-fix/pigz.c |
50 |
--- pigz-2.1.5/pigz.c 2009-07-20 04:42:00.000000000 +0200 |
51 |
+++ pigz-2.1.5-fix/pigz.c 2009-10-25 15:52:22.000000000 +0100 |
52 |
@@ -2498,7 +2498,7 @@ |
53 |
in); |
54 |
return; |
55 |
} |
56 |
- if ((st.st_mode & S_IFMT) == S_IFLNK && !force) { |
57 |
+ if ((st.st_mode & S_IFMT) == S_IFLNK && !force && !pipeout) { |
58 |
if (verbosity > 0) |
59 |
fprintf(stderr, "%s is a symbolic link -- skipping\n", in); |
60 |
return; |