Mageia Bugzilla – Attachment 1892 Details for
Bug 5178
The makewhatis script needs to be able to handle xz compression
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch to add support for xz compressed man pages.
makewhatis.patch (text/plain), 1.65 KB, created by
Dave Hodgins
on 2012-04-01 21:36:01 CEST
(
hide
)
Description:
Patch to add support for xz compressed man pages.
Filename:
MIME Type:
Creator:
Dave Hodgins
Created:
2012-04-01 21:36:01 CEST
Size:
1.65 KB
patch
obsolete
>--- /usr/sbin/makewhatis.original 2012-03-12 06:09:55.000000000 -0400 >+++ /usr/sbin/makewhatis 2012-03-30 20:53:37.655688561 -0400 >@@ -234,7 +234,7 @@ > find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK ' > > function readline() { >- if (use_zcat || use_bzcat || use_lzcat) { >+ if (use_xzcat || use_zcat || use_bzcat || use_lzcat) { > result = (pipe_cmd | getline); > if (result < 0) { > print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr"; >@@ -249,7 +249,7 @@ > } > > function closeline() { >- if (use_zcat || use_bzcat || use_lzcat) { >+ if (use_xzcat || use_zcat || use_bzcat || use_lzcat) { > return close(pipe_cmd); > } else { > return close(filename); >@@ -264,8 +264,10 @@ > print "adding " filename > "/dev/stderr" > } > >- use_zcat = match(filename,"\\.Z$") || >- match(filename,"\\.z$") || match(filename,"\\.gz$"); >+ use_xzcat = match(filename,"\\.xz"); >+ if (!use_xzcat) >+ use_zcat = match(filename,"\\.Z$") || >+ match(filename,"\\.z$") || match(filename,"\\.gz$"); > if (!use_zcat) > use_bzcat = match(filename,"\\.bz2"); > if(!use_bzcat) >@@ -283,8 +285,10 @@ > actual_section = section; > } > sub(/\..*/, "", progname); >- if (use_zcat || use_bzcat || use_lzcat) { >- if (use_zcat) { >+ if (use_xzcat || use_zcat || use_bzcat || use_lzcat) { >+ if (use_xzcat) { >+ pipe_cmd = "xzcat \"" filename "\""; >+ } else if (use_zcat) { > pipe_cmd = "zcat \"" filename "\""; > } else if (use_bzcat) { > pipe_cmd = "bzcat \"" filename "\"";
--- /usr/sbin/makewhatis.original 2012-03-12 06:09:55.000000000 -0400 +++ /usr/sbin/makewhatis 2012-03-30 20:53:37.655688561 -0400 @@ -234,7 +234,7 @@ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK ' function readline() { - if (use_zcat || use_bzcat || use_lzcat) { + if (use_xzcat || use_zcat || use_bzcat || use_lzcat) { result = (pipe_cmd | getline); if (result < 0) { print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr"; @@ -249,7 +249,7 @@ } function closeline() { - if (use_zcat || use_bzcat || use_lzcat) { + if (use_xzcat || use_zcat || use_bzcat || use_lzcat) { return close(pipe_cmd); } else { return close(filename); @@ -264,8 +264,10 @@ print "adding " filename > "/dev/stderr" } - use_zcat = match(filename,"\\.Z$") || - match(filename,"\\.z$") || match(filename,"\\.gz$"); + use_xzcat = match(filename,"\\.xz"); + if (!use_xzcat) + use_zcat = match(filename,"\\.Z$") || + match(filename,"\\.z$") || match(filename,"\\.gz$"); if (!use_zcat) use_bzcat = match(filename,"\\.bz2"); if(!use_bzcat) @@ -283,8 +285,10 @@ actual_section = section; } sub(/\..*/, "", progname); - if (use_zcat || use_bzcat || use_lzcat) { - if (use_zcat) { + if (use_xzcat || use_zcat || use_bzcat || use_lzcat) { + if (use_xzcat) { + pipe_cmd = "xzcat \"" filename "\""; + } else if (use_zcat) { pipe_cmd = "zcat \"" filename "\""; } else if (use_bzcat) { pipe_cmd = "bzcat \"" filename "\"";
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 5178
: 1892