Bug 818775 - grep --devices=skip ignores stdin
Summary: grep --devices=skip ignores stdin
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: grep
Version: 17
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-03 23:19 UTC by Aron Griffis
Modified: 2023-07-28 10:59 UTC (History)
3 users (show)

Fixed In Version: grep-2.12-1.fc17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-06 04:53:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Aron Griffis 2012-05-03 23:19:44 UTC
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):
grep-2.11-1.fc17.x86_64

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-04 03:27:52 UTC
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 08:14:46 UTC
grep-2.12-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/grep-2.12-1.fc17

Comment 3 Fedora Update System 2012-05-04 22:18:16 UTC
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:
https://admin.fedoraproject.org/updates/FEDORA-2012-7325/grep-2.12-1.fc17
then log in and leave karma (feedback).

Comment 4 Aron Griffis 2012-05-05 18:50:31 UTC
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 04:53:07 UTC
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.