Bug 1109122 - xzgrep returns wrong exitcode if match isn't found in every file
Summary: xzgrep returns wrong exitcode if match isn't found in every file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xz
Version: 20
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Pavel Raiskup
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1108085 1109123
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-13 09:45 UTC by Pavel Raiskup
Modified: 2014-06-19 23:01 UTC (History)
7 users (show)

Fixed In Version: xz-5.1.2-12alpha.fc20
Clone Of: 1108085
Environment:
Last Closed: 2014-06-19 23:01:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pavel Raiskup 2014-06-13 09:45:31 UTC
+++ This bug was initially created as a clone of Bug #1108085 +++

Description of problem:
If xzgrep founds match in only portion of tested files, it returns exitcode 1 where EC 0 is expected as it is default behaviour for grep.

Version-Release number of selected component (if applicable):
xz-4.999.9-0.4.beta.20091007git.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. echo test | tee test1 | tee test3; echo text > test2
2. xz -z test*
3. xzgrep -l test *.xz || echo fail

Actual results:
test1.xz:test
test3.xz:test
fail

Expected results:
test1.xz:test
test3.xz:test


Additional info:
-l is optional for reproducing

--- Additional comment from Pavel Raiskup on 2014-06-11 16:26:56 CEST ---

Thanks, this seems to be upstream problem, reported:
http://article.gmane.org/gmane.comp.compression.xz.devel/192

--- Additional comment from Pavel Raiskup on 2014-06-12 12:56:07 CEST ---

Fix pushed upstream:
http://git.tukaani.org/?p=xz.git;a=commitdiff;h=ceca379

Comment 1 Fedora Update System 2014-06-13 10:13:35 UTC
xz-5.1.2-12alpha.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/xz-5.1.2-12alpha.fc20

Comment 2 Fedora Update System 2014-06-13 22:50:39 UTC
Package xz-5.1.2-12alpha.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing xz-5.1.2-12alpha.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-7368/xz-5.1.2-12alpha.fc20
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2014-06-19 23:01:23 UTC
xz-5.1.2-12alpha.fc20 has been pushed to the Fedora 20 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.