Bug 77018
Summary: | Bad return code on 'up-to-date system' | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Milan Kerslager <milan.kerslager> |
Component: | up2date | Assignee: | Adrian Likins <alikins> |
Status: | CLOSED RAWHIDE | QA Contact: | Jay Turner <jturner> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 8.0 | CC: | gafton, mihai.ibanescu, srevivo |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2003-02-14 13:49:54 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Milan Kerslager
2002-10-31 01:21:27 UTC
up2date is designed to be used as an interactive application, so fine grained exit status values are not generally a priority. rhnsd/rhn_check is designed for non-interactive use. I'll take a look at improving the exit codes, but it's a fairly low priority. Here is a patch to fix clean exit code when no packages are available for update: --- /usr/sbin/up2date.orig Tue Oct 8 23:36:53 2002 +++ /usr/sbin/up2date Sat Nov 2 12:30:22 2002 @@ -755,7 +755,8 @@ # raise up2dateErrors.SkipListError("The following packages were on your skip list and could not be installed: %s" % skippedPackagesPkgSkipList, skippedPackagesPkgSkipList) # if len(skippedPackagesFileConfigSkipList): # raise up2dateErrors.FileConfigSkipListError("The following packages were on your skip list and could not be installed: %s" % skippedPackagesFileConfigSkipList, skippedPackagesFileConfigSkipList) - return 1 + # We have nothing to update so this is clean exit + return 0 #FIXME:? should batch run do this itself? if len(batch.depPackages): I underestand that there could be a lot of fine-grained exit codes. This patch solve only current implementation: return 0 or 1 (clean exit and exit with an error). This could satisfy almost all cases of possible in-script use and breaks nothing I hope. Hmm, I'll change this. I'm not completety convinced that returning 0 in this case is correct (and in some cases, it could be wrong). But I'll change it and see if anyone complains. It's a fairly indeterminate state to exit from... should be changed in version 3.0.15 or newer Change confirmed in up2date-3.1.15-7. |