Bug 446202 - rpm -i ""returns 0 while reporting an error.
Summary: rpm -i ""returns 0 while reporting an error.
Keywords:
Status: CLOSED DUPLICATE of bug 463944
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rpm
Version: 5.1
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Panu Matilainen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-13 14:27 UTC by Alex Page
Modified: 2009-01-09 13:57 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-09-26 07:55:33 UTC
Target Upstream Version:


Attachments (Terms of Use)

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 ***


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