Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 56366 - rpm -ihv wrong_pkg_name* (note wildcard) reports no error
rpm -ihv wrong_pkg_name* (note wildcard) reports no error
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2001-11-16 01:20 EST by Ralph Rodriguez
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-11-16 01:20:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ralph Rodriguez 2001-11-16 01:20:18 EST
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
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:

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

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 18:04:00 EST
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.