Description of problem: Please document yum exit values. The only note in a `man yum` is about check- updates 100/0. I'm asking because I just noted, then when I tried to upgrade while one of the packages have broken deps I got $? == 1. Usually yum returns 0, or 1 if it tracebacks. Version-Release number of selected component (if applicable): yum-3.0.1-5.el5.noarch Additional info: Make yum more "hackable" with exit codes and/or standardize the output to make it easier for shell scripts and one liners to interact with No. Just no. If you don't like it, go have a conversation with yourself about it. Alone. At home. In your closet. Why not? ... --http://wiki.linux.duke.edu/YumTodont#head- dbc33b4a2fa91306796798e6f9119d235172e1aa
Just run into another issue - while yum did what I wanted, it ended with 1: # yum -y install --disablerepo=repo011 --disablerepo=repo022 --downloadonly test --downloaddir=. ... Downloading Packages: (1/1): test-0.1-1.i386.rp 100% |=========================| 2.2 kB 00:00 # echo $? 1
Bad copy&paste: # yum -y install --disablerepo=repo011 --disablerepo=repo022 --downloadonly test --downloaddir=. ... Downloading Packages: (1/1): test-0.1-1.i386.rp 100% |=========================| 2.2 kB 00:00 exiting because --downloadonly specified # echo $? 1 And there is this code in /usr/lib/yum-plugins/downloadonly.py: def postdownload_hook(conduit): opts, commands = conduit.getCmdLine() if opts.dlonly: raise PluginYumExit('exiting because --downloadonly specified ')
Right, that's how yum-downloadonly works ... it pretends something bad happened. In theory it could probably call sys.exit(), but this way guarantees any cleanup needed is done.