Bug 818775 - grep --devices=skip ignores stdin
grep --devices=skip ignores stdin
Product: Fedora
Classification: Fedora
Component: grep (Show other bugs)
All Linux
unspecified Severity high
: ---
: ---
Assigned To: Jaroslav Škarvada
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-05-03 19:19 EDT by Aron Griffis
Modified: 2012-05-06 00:53 EDT (History)
2 users (show)

See Also:
Fixed In Version: grep-2.12-1.fc17
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-05-06 00:53:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Aron Griffis 2012-05-03 19:19:44 EDT
Description of problem:
In F16, "grep --devices=skip" would search stdin if no files were specified on the command-line. In F17, it returns immediately with exit status 1. This breaks grep wrappers that assume (based on previous behavior) that it's okay to specify --devices=skip.

It appears that this might be a regression in grep 2.11 which is fixed in 2.12, considering the wording in the manual page has changed. See http://www.gnu.org/software/grep/manual/grep.html where it says "This option has no effect on a file that is read via standard input."

Version-Release number of selected component (if applicable):

How reproducible:
every time

Steps to Reproduce:
1. echo foo | grep -q --devices=skip foo
Actual results:
exit status 1

Expected results:
exit status 0

Additional info:
Comment 1 Aron Griffis 2012-05-03 23:27:52 EDT
In fact, this regression is specifically called out as one of two regressions fixed in grep 2.12: http://savannah.gnu.org/forum/forum.php?forum_id=7207
Comment 2 Fedora Update System 2012-05-04 04:14:46 EDT
grep-2.12-1.fc17 has been submitted as an update for Fedora 17.
Comment 3 Fedora Update System 2012-05-04 18:18:16 EDT
Package grep-2.12-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing grep-2.12-1.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 4 Aron Griffis 2012-05-05 14:50:31 EDT
Thanks for your quick attention to this Jaroslav! The update is working well for me, and I left karma as requested.
Comment 5 Fedora Update System 2012-05-06 00:53:07 EDT
grep-2.12-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.