> -----Original Message----- > From: yum-bounces@xxxxxxxxxxxxxxxxxxxx [mailto:yum- > bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf Of Rex Dieter > Sent: Friday, March 03, 2006 2:50 PM > To: yum@xxxxxxxxxxxxxxxxxxxx > Subject: [Yum] Re: yum exit codes > > seth vidal wrote: > > On Fri, 2006-03-03 at 11:28 -0800, David Lutterkort wrote: > > > >>For an application that is not written in python, I need to do some > >>simple yum actions (yum update/yum install/yum list updates) and would > >>like to have a clean indication of whether the yum command succeeded or > >>not. Unfortunately, it seems that, e.g. yum install exits with return > >>code 0 even if something went wrong during the install. > >> > >>What is the recommended way of achieveing this without having to write > >>my own python gluecode ? > > > > > > define a failure for me: > > I'd argue that *any* form of failure, even partial, should not return > 0/success. Perhaps exit codes should be more defined. For example, '0' would always be absolute success (all packages installed successfully). 1 = One or more packages failed to install dependencies 2 = One or more packages are already installed 4 = All selected packages failed ... The only problem is that the problems could vary so much: 4 packages selected + 1 installed + 1 failed to install dependencies + 2 are already installed It'd be tough to prioritize which of those statuses should raise an error as what's important to one user may not be to another. For example, I don't consider a package already being installed error-worthy; one that fails a dependency is. ry > > -- Rex > > _______________________________________________ > Yum mailing list > Yum@xxxxxxxxxxxxxxxxxxxx > https://lists.dulug.duke.edu/mailman/listinfo/yum