Bug 56366 - rpm -ihv wrong_pkg_name* (note wildcard) reports no error
Summary: rpm -ihv wrong_pkg_name* (note wildcard) reports no error
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.2
Hardware: i686
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-16 06:20 UTC by Ralph Rodriguez
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-11-16 06:20:24 UTC
Embargoed:


Attachments (Terms of Use)

Description Ralph Rodriguez 2001-11-16 06:20:18 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
Run the following commands in succession:
     rpm -ihv wrong_pkg_name*
     echo $?
The first command should report an error message; it does not.
The second command should report a non-zero status; it reports a zero
status.
If the wildcard is not used, system acts appropriately.
Under 7.1, system acts appropriately.
It seems to be a 7.2 specific problem.
Same result with rpm -Uhv; I have not tested rpm -Fhv or without the -hv.
I have tried it using an ftp url for the pkg name and the problem exists
there as well.

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


How reproducible:
Always

Steps to Reproduce:
1. rpm -ihv wrong_pkg_file*
2.echo $?
3.
	

Actual Results:  First command reported no error.
Second command reports error status of zero.

Expected Results:  First command should report an error.
Second command should report a non-zero status.

Additional info:

Although it is not a serious bug, it is confusing to new users.

Comment 1 Jeff Johnson 2001-11-19 23:04:00 UTC
rpm-4.0.3 includes support for manifests, i.e. files with lists
of glob expressions, so non-package files are now permitted
on the command line. So a non-package file, even one that
cannot be interpreted a a list of glob expressions, is no longer
an error. And, since a manifest file can contain multiple
package instances, the traditional rpm return code of
	Number of failed packages
really doesn't apply anymore. Should the exit code be
1 or 10 if a manifest includes 10 packages? And, if
the object doesn't exist at all (this case), shouldn't the
return code be 0 == the number of failing objects?

The bottom line is that your script is gonna have to do more
than check the return code for pathological input.


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