Bug 104438

Summary: up2date --get-source pkg throws exception if src.rpm is missing
Product: [Retired] Red Hat Network Reporter: Alexandre Oliva <aoliva>
Component: RHN/ChannelsAssignee: Adrian Likins <alikins>
Status: CLOSED WORKSFORME QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: medium    
Version: RHN StableCC: fenlason, gafton, mihai.ibanescu
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: 2005-10-04 18:50:27 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 Alexandre Oliva 2003-09-15 16:39:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703

Description of problem:
If a src.rpm is not available from a RHN channel, up2date --get-source pkg
throws an exception that doesn't even mention what package the error has to do with.

Version-Release number of selected component (if applicable):
up2date-3.9.26-2

How reproducible:
Always

Steps to Reproduce:
1.Subscribe machine to Severn (beta1) updates channel
2.up2date --get-source gdb-5.3.90-0.20030710.29 (at least until the .src.rpm
that was accidentally left out is uploaded)

Actual Results:  # up2date --get-source `ls *.hdr | sed s,\.[^.]*\.hdr$,,`     
                                                                           
Fetching all package list for channel: redhat-linux-severn-i386-9.0.93...
########################################
 
Fetching all package list for channel: redhat-linux-severn-i386-9.0.93-updates...
########################################
 
Fetching package list for channel: redhat-linux-severn-i386-9.0.93...
########################################
 
Fetching package list for channel: redhat-linux-severn-i386-9.0.93-updates...
########################################
 
Traceback (most recent call last):
  File "/usr/sbin/up2date", line 1157, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date", line 652, in main
    return getPackages(pkgNames, source=1)
  File "/usr/sbin/up2date", line 970, in getPackages
    onlySource = source)
  File "/usr/share/rhn/up2date_client/up2date.py", line 343, in getPackage
    progressCallback)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 160, in doCall
    pkgName = "%s-%s-%s.%s" % (pkg[0], pkg[1], pkg[2], pkg[4])
  File "/usr/share/rhn/up2date_client/rhnChannel.py", line 50, in __getitem__
    return self.dict[item]
KeyError: 0

Expected Results:  It should download the src rpm but, if it's not available, it
should tell me so.

Additional info:

Comment 1 Adrian Likins 2003-09-15 20:57:17 UTC
got a fix for this, probably around 3.9.28 or so

Comment 2 Adrian Likins 2003-09-15 21:20:13 UTC
*** Bug 102845 has been marked as a duplicate of this bug. ***

Comment 3 Alexandre Oliva 2003-09-17 03:48:01 UTC
It's better in 3.9.28-2, but still odd, see below.  The first `File Not Found'
line should probably not be there.  Also, the Explanation seems bogus.  There's
no reason to report a bug just because an SRPM is not available. 

File Not Found:
File Not Found: postgresql-odbc-7.3-3.src.rpm
 
Error Message:
    Invalid RPM package postgresql-odbc-7.3-3.src.rpm requested
Error Class Code: 17
Error Class Info: File not found.
Explanation:
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.


Comment 4 Adrian Likins 2003-09-17 19:09:23 UTC
Well, if you get that error, it's because the server thinks that
package exists, and it doesn't, so it is a bug. It's just
a server side bug. That's not really supposed to happen.
Although, for reasons I dont really know, it seems to
happen a lot recently...

The extra File Not Found should go away, as mentioned...

Comment 5 Mihai Ibanescu 2003-09-19 22:58:25 UTC
It is quite funny, the file does exist. It's not a DB issue, I'll have to dig
out to see exactly where the problem is.

Comment 6 Mihai Ibanescu 2003-09-22 20:12:29 UTC
I can fetch postgresql-odbc-7.3-3.src.rpm just fine

c68b86c9dca1fe1a7015203f54d2b468 is its md5sum.

Comment 7 Alexandre Oliva 2003-09-22 20:34:55 UTC
This may very well mean the file was uploaded (as it should) after the report,
not that the problem is fixed.