xzgrep: fix non-working -h option

Version: xz-5.1.2-5alpha
Resolves: #850898
This commit is contained in:
Pavel Raiskup 2013-04-09 13:01:06 +02:00
parent e01a5abdb7
commit 93ff517f90
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,23 @@
commit 5019413a055ce29e660dbbf15e02443cb5a26c59
Author: Jeff Bastian <jbastian@redhat.com>
AuthorDate: Wed Apr 3 13:59:17 2013 +0200
Commit: Lasse Collin <lasse.collin@tukaani.org>
CommitDate: Fri Apr 5 19:14:50 2013 +0300
xzgrep: make the '-h' option to be --no-filename equivalent
* src/scripts/xzgrep.in: Accept the '-h' option in argument parsing.
diff --git a/src/scripts/xzgrep.in b/src/scripts/xzgrep.in
index d8e9bb5..951266b 100644
--- a/src/scripts/xzgrep.in
+++ b/src/scripts/xzgrep.in
@@ -109,7 +109,7 @@ while test $# -ne 0; do
files_with_matches=1;;
(-L | --files-witho*)
files_without_matches=1;;
- (--no-f*)
+ (-h | --no-f*)
no_filename=1;;
(-V | --v | --ve | --ver | --vers | --versi | --versio | --version)
echo "$version" || exit 2

View File

@ -19,6 +19,11 @@ Requires: %{name}-libs = %{version}-%{release}
# ~> #948533 # ~> #948533
Patch0: xz-5.1.2alpha-man-page-day.patch Patch0: xz-5.1.2alpha-man-page-day.patch
# fix 'xzgrep -h' to behave as expected
# ~> upstream (5019413a0)
# ~> #948533
Patch1: xz-5.1.2alpha-xzgrep-and-h-option.patch
%description %description
XZ Utils are an attempt to make LZMA compression easy to use on free (as in XZ Utils are an attempt to make LZMA compression easy to use on free (as in
freedom) operating systems. This is achieved by providing tools and libraries freedom) operating systems. This is achieved by providing tools and libraries
@ -72,6 +77,7 @@ commands that deal with the older LZMA format.
%prep %prep
%setup -q -a1 -n %{name}-%{version}alpha %setup -q -a1 -n %{name}-%{version}alpha
%patch0 -p1 -b .man-page-day %patch0 -p1 -b .man-page-day
%patch1 -p1 -b .xzgrep-and-h-option
for i in `find . -name config.sub`; do for i in `find . -name config.sub`; do
perl -pi -e "s/ppc64-\*/ppc64-\* \| ppc64p7-\*/" $i perl -pi -e "s/ppc64-\*/ppc64-\* \| ppc64p7-\*/" $i
@ -147,6 +153,7 @@ rm -rf %{buildroot}
%changelog %changelog
* Tue Apr 09 2013 Pavel Raiskup <praiskup@redhat.com> - 5.1.2-5alpha * Tue Apr 09 2013 Pavel Raiskup <praiskup@redhat.com> - 5.1.2-5alpha
- fix manual page inconsistencies with help output (private #948533) - fix manual page inconsistencies with help output (private #948533)
- enable/fix the 'xzgrep -h' (#850898)
* Thu Feb 21 2013 Karsten Hopp <karsten@redhat.com> 5.1.2-4alpha * Thu Feb 21 2013 Karsten Hopp <karsten@redhat.com> 5.1.2-4alpha
- add support for ppc64p7 arch (Power7 optimized) - add support for ppc64p7 arch (Power7 optimized)