Bug 746147

Summary: yum localinstall should return non-zero in case of non existing files specified on command line.
Product: [Fedora] Fedora Reporter: Marian Ganisin <mganisin>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: ffesti, james.antill, maxamillion, pmatilai, tla, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 746148 (view as bug list) Environment:
Last Closed: 2011-10-14 19:00:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 746148    

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.