Bug 446202

Summary: rpm -i ""returns 0 while reporting an error.
Product: Red Hat Enterprise Linux 5 Reporter: Alex Page <alexp>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED DUPLICATE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.1CC: psklenar
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-26 07:55:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alex Page 2008-05-13 14:27:57 UTC
Description of problem:

  When you try to install a package and pass an empty string for the package 
name, rpm prints an error message on STDERR but returns a status of 0. It 
should either not print an error, or return 1.

Version-Release number of selected component (if applicable):

  rpm-4.4.2-47.el5

How reproducible:

  Always

Steps to Reproduce:

Where "ksjkjdksjdkjsd" is a file which doesn't exist, as root:

1. rpm -i "ksjkjdksjdkjsd.rpm"; echo "Return: $?"
2. rpm -i ""; echo "Return: $?"
  
Actual results:

1. rpm -i "klkskdlsklks"; echo "Return: $?"
error: open of klkskdlsklks failed: No such file or directory
Return: 1

2. rpm -i ""; echo "Return: $?"
error: File not found by glob:
Return: 0

Expected results:

1. rpm -i "klkskdlsklks"; echo "Return: $?"
error: open of klkskdlsklks failed: No such file or directory
Return: 1

2. rpm -i ""; echo "Return: $?"
error: File not found by glob:
Return: 0

Additional info:

If the usage case in 2 is an error, it should not return 0. If it is not an 
error, it should not say that it is an error.

Comment 1 Alex Page 2008-05-13 14:28:30 UTC
Argh, expected results is wrong - in step 2 it should read:

Return: 1

Comment 2 Panu Matilainen 2008-09-26 07:55:33 UTC

*** This bug has been marked as a duplicate of bug 463944 ***