Bug 746147 - yum localinstall should return non-zero in case of non existing files specified on command line.
Summary: yum localinstall should return non-zero in case of non existing files specifi...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 746148
TreeView+ depends on / blocked
 
Reported: 2011-10-14 05:48 UTC by Marian Ganisin
Modified: 2014-01-21 23:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 746148 (view as bug list)
Environment:
Last Closed: 2011-10-14 19:00:12 UTC
Type: ---


Attachments (Terms of Use)

Description Marian Ganisin 2011-10-14 05:48:14 UTC
Description of problem:

From the shell:

/tmp/empty $ LANG=en_US sudo yum localinstall *.rpm ; echo '$?='$?
Loaded plugins: fastestmirror
Setting up Local Package Process
Cannot open: *.rpm. Skipping.
Nothing to do
$?=0
/tmp/empty $

yum localinstall returns 0 code if there is 'Nothing to do'. However this is error state in my opinion, for example ls has exactly same opinion:

/tmp/empty $ LANG=en_US ls *.rpm ; echo '$?='$?
ls: cannot access *.rpm: No such file or directory
$?=2
/tmp/empty $

Expected result:
Non-zero return code for this use case

Comment 1 James Antill 2011-10-14 19:00:12 UTC
Use: yum install *.rpm ... instead, and it'll do what you want.

Given that localinstall is deprecated, I don't see why we'd want to change this here.


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