Bug 91093 - return code in manpage not right
return code in manpage not right
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: up2date (Show other bugs)
2.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bret McMillan
Fanny Augustin
:
Depends On:
Blocks: 120092
  Show dependency treegraph
 
Reported: 2003-05-17 17:18 EDT by J.M.Roth
Modified: 2007-11-30 17:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-19 15:24:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description J.M.Roth 2003-05-17 17:18:32 EDT
Description of problem:

The man page for up2date says this
RETURN CODES
       Update Agent returns 0 on success, 1 on error.
However, the behavior seems to be inverted.
I've never managed to get a code 0, neither on success or error.

Version-Release number of selected component (if applicable):
up2date-2.8.39-1.7.2


How reproducible:
[root@x:0 ~]# up2date -u --nox; RETVAL=$?; echo $RETVAL                        
                                  

Fetching package list for channel: redhat-linux-i386-7.2...
########################################

Fetching Obsoletes list for channel: redhat-linux-i386-7.2...
########################################

Fetching rpm headers...
########################################

Testing package set / solving RPM inter-dependencies...
########################################
kernel-smp-2.4.20-13.7.i686 ########################## Done.                   
kernel-source-2.4.20-13.7.i ########################## Done.                   
Preparing...                ########################################### [100%]

Installing...
   1:kernel-source          ########################################### [100%]
   2:kernel-smp             ########################################### [100%]
1


The return code is 1 when an action is carried out ok.
The return code is 11 when a demo account has no access temporarily.

Steps to Reproduce:
1.
2.
3.
    
Actual results:
$RETVAL=1

Expected results:
$RETVAL=0

Additional info:
Comment 1 Trond H. Amundsen 2003-06-27 08:21:45 EDT
I'd like to add that this behaviour exist for RHEL versions too (only tested on
AS and ES). However, the return code '11' has nothing to do with demo accounts:

  # up2date -u
  
  Fetching package list for channel: redhat-ent-linux-i386-es-2.1...
  ########################################
  
  Fetching Obsoletes list for channel: redhat-ent-linux-i386-es-2.1...
  ########################################
  
  Fetching rpm headers...
  None of the packages you requested were found, or they are already updated.
  # echo $?
  11

Seemingly bogus, undocumented return codes makes it difficult to monitor up2date
command executed by crond. Parsing the output isn't easy and shouldn't be
necessary with proper, well-documented return codes.
Comment 2 J.M.Roth 2003-06-27 09:19:46 EDT
As far as I am concerned a separate return code for demo accounts which
currently don't have access would be very useful as well.
Comment 3 John Thacker 2006-04-22 11:38:12 EDT
In any case, up2date is no longer shipped with Fedora Core; its functionality 
has been replaced by pup, found in the pirut package.  The only fixes 
likely to be made to up2date in RedHat Linux and earlier Fedora Core 
versions are security fixes by Fedora Legacy.  This does not seem to 
be a security bug, so I'm closing it.

Since a comment claims that this happens on RHEL as well, setting it to RHEL. 
Please retest if it occurs there.
Comment 4 RHEL Product and Program Management 2007-10-19 15:24:57 EDT
This bug is filed against RHEL2.1, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products.  Since
this bug does not meet that criteria, it is now being closed.

For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/

If you feel this bug is indeed mission critical, please contact your
support representative.  You may be asked to provide detailed
information on how this bug is affecting you.

Note You need to log in before you can comment on or make changes to this bug.