Bug 141289

Summary: up2date returns 404 for kernel source
Product: [Fedora] Fedora Reporter: Bobby Tharrington <btharrington>
Component: up2dateAssignee: Adrian Likins <alikins>
Status: CLOSED DUPLICATE QA Contact: Fanny Augustin <fmoquete>
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: olegmakarenko
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-06-27 16:17:14 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:
Attachments:
Description Flags
Hack to make up2date --get-source work in fc3 none

Description Bobby Tharrington 2004-11-30 04:08:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
[root@webdev-laptop1 up2date]# up2date --get-source kernel
http://fedora.redhat.com/download/up2date-mirrors/fedora-core-3
using mirror: http://gd.tuwien.ac.at/opsys/linux/fedora/core/3/i386/os/
http://fedora.redhat.com/download/up2date-mirrors/updates-released-fc3
using mirror:
http://mirror.switch.ch/ftp/mirror/fedora/linux/core/updates/3/i386

Fetching all package list for channel: fedora-core-3...
########################################

Fetching all package list for channel: updates-released-fc3...
########################################

Fetching package list for channel: fedora-core-3...

Fetching
http://gd.tuwien.ac.at/opsys/linux/fedora/core/3/i386/os//headers/header.info...
########################################

Fetching package list for channel: updates-released-fc3...

Fetching
http://mirror.switch.ch/ftp/mirror/fedora/linux/core/updates/3/i386/headers/header.info...
########################################

kernel-2.6.9-1.681_FC3.src.rpm...
Traceback (most recent call last):
  File "/usr/sbin/up2date", line 1248, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date", line 714, in main
    return getPackages(pkgNames, source=1)
  File "/usr/sbin/up2date", line 1065, in getPackages
    onlySource = source)
  File "/usr/share/rhn/up2date_client/up2date.py", line 196, in getPackage
    progressCallback)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 335, in doCall
    raise up2dateErrors.CommunicationError(msg)
up2date_client.up2dateErrors.CommunicationError: Error communicating
with server. The message was:

An HTTP error occurred:
URL:
http://mirror.switch.ch/ftp/mirror/fedora/linux/core/updates/3/i386/SRPMS/kernel-2.6.9-1.681_FC3.src.rpm
Status Code: 404
Error Message: Not Found



Version-Release number of selected component (if applicable):
up2date-4.3.47-5

How reproducible:
Always

Steps to Reproduce:
1.run up2date --get-source kernel
2.
3.
    

Actual Results:  404 error returned

Also, a 0 size rpm is created in the spool directory.  You have to
delete the 0 size src.rpm to reproduce the error (otherwise, no error
is reported but the file remains a 0 size):

[root@webdev-laptop1 up2date]# ls -l /var/spool/up2date/kernel*
-rw-------  1 root root 772357 Nov 29 10:53
/var/spool/up2date/kernel-2.6.9-1.681_FC3.i686.hdr
-rw-r--r--  1 root root      0 Nov 29 10:57
/var/spool/up2date/kernel-2.6.9-1.681_FC3.src.rpm


Additional info:

Comment 1 John Reiser 2004-12-07 19:50:09 UTC
Note that the http 404 error can be explained by the
".../i386/SRPMS/..." in the pathname.  It should be ".../SRPMS/..."
without the "/i386"; that is, --get-source must remove the trailing
$ARCH before adding "/SRPMS".  So, a manual workaround is to use
'wget' or 'curl' on a copy-and-edit pathname.

Comment 2 Oleg Makarenko 2005-01-29 18:44:58 UTC
It is also not possible to use --get-source for any other package.

If you enable the retrieveSource=1 in /etc/sysconfig/rhn/up2date then
up2date stops on every package as it is unable to download source files. 

So retrieveSource doesn't work in FC3.

wget and curl may be used as a workaround for ad hoc source packages
downloads but not on a regular basis.



Comment 3 Oleg Makarenko 2005-01-29 18:53:54 UTC
seems to be duplicate of 141459

Comment 4 Oleg Makarenko 2005-01-29 22:31:59 UTC
Created attachment 110402 [details]
Hack to make up2date --get-source work in fc3

Actually you can't get SRPMS for any updated package. There is no SRPMS
directory in .../updates/3/i386/ where up2date tries to find the source
package:

url = "%s/SRPMS/%s" % (channel[url], filename)

Fedora Core 2 and 1 do have SRPMS directory so this line works fine. 

Looks like a problem with repository. Is it that difficult to add a link to
.../updates/3/SRPMS?

As a workaround I have hacked up2date to accept one more optional parameter for
SRPMS relative path.

See the patch for details.

Comment 5 Steven D. Harris 2005-04-29 19:01:23 UTC
this is a duplicate of assigned bug #141901, only this bug report has a HACK to
patch the problem (see comment #4 from Oleg).

Comment 6 Rahul Sundaram 2005-06-27 16:17:14 UTC

*** This bug has been marked as a duplicate of 141901 ***