Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 462797

Summary: yum-downloadonly doesn't show errors for downloaded packages
Product: Red Hat Enterprise Linux 5 Reporter: James Antill <james.antill>
Component: yum-utilsAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: dkovalsk, jhutar
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 22:05:40 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 James Antill 2008-09-18 22:10:48 UTC
Description of problem:
 With the very latest yum/rpm/yum-rhn-plugin/python combo. when you hit Control c on a download from RHN it just skips that package, which means the update will fail later as the rpm hasn't been fully downloaded.

 This is easy to see with the latest yum because everything is downloading in ascending order, just get a bunch of packages that need an update which are "big" and hit C-c in the middle of one of them:

(196/206): glibc-2.5-24.i686.rpm                         | 5.2 MB     00:01     
(197/206): libicu-3.6-5.11.1.i386.rpm                    | 5.2 MB     00:01     
(198/206): gcc-4.1.2-42.el5.i386.rpm                     | 5.2 MB     00:01     
(199/206): gtk2-2.10.4-20.el5.i386.rpm                   | 6.5 MB     00:01     
(200/206): mesa-libGL-6.5.1-7.5.el5.i386.rpm             | 4.7 MB     00:01     

 Current download cancelled, interrupt (ctrl-c) again within two seconds to exit.

(201/206): emacs-common-21.4-20.el5.i386.rpm             | 6.5 MB     00:01     

ls confirms:

-rw-r--r-- 1 root root 4.7M Sep 18 18:08 /var/cache/yum/rhel-i386-server-5/packages/mesa-libGL-6.5.1-7.5.el5.i386.rpm

yum --version shows:

  Installed: rpm-4.4.2.3-4.el5.i386 at 2008-09-18 19:38
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2008-09-02 07:44
  Committed: Panu Matilainen <pmatilai> at 2008-09-02 22:00

  Installed: yum-3.2.19-8.el5.noarch at 2008-09-16 18:27
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2008-09-16 17:25
  Committed: James Antill <jantill> at 2008-09-16 22:00

  Installed: yum-metadata-parser-1.1.2-2.el5.i386 at 2008-09-16 18:26
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2008-01-18 17:43
  Committed: James Antill <james.antill> at 2008-01-18 22:00

  Installed: yum-rhn-plugin-0.5.3-25.el5.noarch at 2008-09-18 22:06
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2008-09-18 14:50
  Committed: Pradeep Kilambi <pkilambi> at 2008-09-18 22:00

...the yum has the fix from https://bugzilla.redhat.com/show_bug.cgi?id=462784 but that's it.

Comment 1 RHEL Program Management 2008-09-18 22:34:11 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 2 James Antill 2008-09-19 06:30:28 UTC
Gah, this is a problem in the downloadonly plugin. Always has been, so I'll move it to 5.4.z.

Comment 3 James Antill 2008-09-19 06:43:35 UTC
 Fix is upstream in 431f22085e91fd030b5c9e9dfe219ad10af45cfc and is just:

diff --git a/plugins/downloadonly/downloadonly.py b/plugins/downloadonly/downloa
index a0541eb..8bbf7bb 100644
--- a/plugins/downloadonly/downloadonly.py
+++ b/plugins/downloadonly/downloadonly.py
@@ -40,5 +40,6 @@ def postreposetup_hook(conduit):
 
 def postdownload_hook(conduit):
     opts, commands = conduit.getCmdLine()
-    if opts.dlonly:
+    # Don't die on errors, or we'll never see them.
+    if not conduit.getErrors() and opts.dlonly:
         raise PluginYumExit('exiting because --downloadonly specified ')


...so we can still fix it for 5.3 if we want to?

Comment 4 RHEL Program Management 2008-09-19 07:01:06 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 14 errata-xmlrpc 2009-01-20 22:05:40 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0227.html