Subject: pkg/37528: pkgsrc gzip: zgrep -h doesn't work
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <sd4dfg2@hotmail.com>
List: pkgsrc-bugs
Date: 12/12/2007 18:10:00
>Number:         37528
>Category:       pkg
>Synopsis:       pkgsrc gzip: zgrep -h doesn't work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 12 18:10:00 +0000 2007
>Originator:     Rob Quinn
>Release:        Solaris with pkgsrc current
>Organization:
>Environment:
>Description:
pkgsrc/gzip's "zgrep -h" doesn't suppress filenames like it should.  If you google for "zgrep -h" (with quotes) you can see others complaining about it, including someone complaining on the GNU gzip mailing list.  I don't see an official solution but I didn't search very hard.  Older versions of zgrep didn't have this problem.  "zgrep --no-f" works.
>How-To-Repeat:

>Fix:
My quick fix was to add -h to the --no-f check:

%%diff -C1 zgrep /tmp/zgrep
*** zgrep       Wed Dec 12 11:38:06 2007
--- /tmp/zgrep  Wed Dec 12 11:35:10 2007
***************
*** 107,109 ****
      files_without_matches=1;;
!   (--no-f* | -h)
      no_filename=1;;
--- 107,109 ----
      files_without_matches=1;;
!   (--no-f*)
      no_filename=1;;