Hide Forgot
Description of problem: From the shell: /tmp/empty $ LANG=en_US sudo yum localinstall *.rpm ; echo '$?='$? Loaded plugins: fastestmirror Setting up Local Package Process Cannot open: *.rpm. Skipping. Nothing to do $?=0 /tmp/empty $ yum localinstall returns 0 code if there is 'Nothing to do'. However this is error state in my opinion, for example ls has exactly same opinion: /tmp/empty $ LANG=en_US ls *.rpm ; echo '$?='$? ls: cannot access *.rpm: No such file or directory $?=2 /tmp/empty $ Expected result: Non-zero return code for this use case
Use: yum install *.rpm ... instead, and it'll do what you want. Given that localinstall is deprecated, I don't see why we'd want to change this here.