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