[Yum] Re: yum exit codes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 03, 2006 at 02:54:50PM -0500, Ryan Frantz wrote:
> 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
> ...

I think this is indeed the way to go.  Several notes:

  1) it doesn't need to be perfect.  The idea is to provide something
     useful to people that need a quick-and-dirty.  We have a full
     python interface if folks need more.

  2) there's not a lot of room for feedback.  If you go the bitmask
     route, there are 16 bits?  I suggest leaving a few for "general"
     feedback and the rest for specific feedback.  For example:

     1  -  warnings, but not necessarily error (this to be determined
           by seth unilaterally or after some discussion)
     2  -  some sort of error (same)
     4  -  package(s) already installed (also 1)
     8  -  requested package could not be installed (also 2)
     etc

  3) another approach would be to not use bitmasks but specific codes

     1  - unspecified error
     2  - unspecified warning
     3  - packages already installed
     4  - package could not be installed
     etc

     You get more room with this approach, but you can't combine.

Anyway, my main point is that 0 should mean nothing wacky happened
(again, just make the call to serve as many people as possible... the
rest will just have to cope), provide specific feedback for a few
common cases and provide general feedback for the rest.  That'll meet
the needs of 95% of the people who want this.  The rest will have to
suck it up.  That's what they have to do now.

					-Michael
-- 
  Michael D. Stenner                            mstenner@xxxxxxxxxxxxxxx
  ECE Department and Optical Sciences Center                520-626-1619
  University of Arizona                                         ECE 524G

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux