Bug 1351718 - osinfo-query does not return 1 when no matches found, as it claims
Summary: osinfo-query does not return 1 when no matches found, as it claims
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libosinfo
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-30 16:03 UTC by Adam Williamson
Modified: 2017-02-16 21:39 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-02-16 21:39:21 UTC
Embargoed:


Attachments (Terms of Use)

Description Adam Williamson 2016-06-30 16:03:45 UTC
'man osinfo-query' claims:

"The exit status will be 0 if matching entries were found, or 1 if not matches were found"

However:

[adamw@adam tools (relabel-permissive %)]$ rpm -q libosinfo
libosinfo-0.3.0-2.fc24.x86_64
[adamw@adam tools (relabel-permissive %)]$ osinfo-query os short-id=fedora24
 Short ID             | Name                                               | Version  | ID                                      
----------------------+----------------------------------------------------+----------+-----------------------------------------
[adamw@adam tools (relabel-permissive %)]$ echo $?
0

Comment 1 Fabiano Fidêncio 2016-06-30 17:05:54 UTC
Patch sent to the ML:
https://www.redhat.com/archives/libosinfo/2016-June/msg00066.html

Comment 3 Cole Robinson 2017-02-16 21:39:21 UTC
commit fbe3dff28709943dcb86af433370371fe6ff7fe2
Author: Fabiano Fidêncio <fidencio>
Date:   Thu Jun 30 18:59:11 2016 +0200

    osinfo-query: return failure when no matches are found


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