Bug 160576 - up2date fails to install RPMs from file:// URLs with IndexError
up2date fails to install RPMs from file:// URLs with IndexError
Product: Fedora
Classification: Fedora
Component: up2date (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Bret McMillan
Fanny Augustin
Depends On:
  Show dependency treegraph
Reported: 2005-06-15 17:08 EDT by Ben Webb
Modified: 2008-08-02 19:40 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-11-05 11:30:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
/var/log/up2date (1.81 KB, text/plain)
2005-06-15 17:11 EDT, Ben Webb
no flags Details

  None (edit)
Description Ben Webb 2005-06-15 17:08:37 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4

Description of problem:
up2date (using repomd) will not read a repository specified with a file:// URL, and crashes with an IndexError. The same repository accessed via HTTP works just fine. yum has no trouble with the same configuration.

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

How reproducible:

Steps to Reproduce:
1. Leave /etc/sysconfig/rhn/sources unchanged, i.e. it should use
"repomd fedora http://fedora.redhat.com/" only.
2. Comment out the 'baseurl' and 'mirrorlist' lines in /etc/yum.repos.d/fedora.repo, and add
where the file:// URL points to an NFS-exported directory full of the RPMs from the FC4 binary CDs, with 'createrepo .' run on it beforehand.
3. Try to install a 'core' RPM, e.g.
   up2date gcc-c++

Actual Results:  up2date failed with the error:
Fetching obsoletes list for file:///myserver/share/Fedora/RPMS/...

Fetching rpm headers...
rpm was unable to load a header
An error has occurred:
See /var/log/up2date for more information

I'll attach my /var/log/up2date for the Python traceback.

Expected Results:  up2date should have installed the gcc-c++ RPM, plus any dependencies.

Additional info:

"yum install gcc-c++" works just fine with this configuration.

up2date does actually download the RPM into /var/spool/up2date/, but mistakenly thinks it's the .hdr file instead:

[root@localhost ~]# file /var/spool/up2date/gcc-c++-4.0.0-8.i386.hdr
/var/spool/up2date/gcc-c++-4.0.0-8.i386.hdr: RPM v3 bin i386 gcc-c++-4.0.0-8

From the Python traceback, it looks like this is what causes the problem further on.

If I serve the files with HTTP instead, and alter the fedora.repo file to read
then everything works OK.
Comment 1 Ben Webb 2005-06-15 17:11:49 EDT
Created attachment 115512 [details]

This is the Python traceback which accompanies the up2date error message.

P.S. I also tried 'up2date -v' but it adds no extra error information.
Comment 2 M.Gombkoetoe 2005-10-14 11:13:54 EDT
in my case i have found the solution. 
i'm disabling the proxy of my firewall and all works fine.
Comment 3 Ben Webb 2005-10-14 12:07:33 EDT
If adjusting your firewall solves the problem for you, then I don't see how you
can have the same problem I have - the RPMs are served via a file:// URL, so go
through the filesystem, not over the network (true, they are currently on an NFS
mount, but up2date doesn't know that).
Comment 4 John Thacker 2006-10-29 15:29:20 EST
up2date was replaced by pirut and put (package pirut) as of FC5.  Only FC5 and
FC6 are currently fully supported; FC3 and FC4 are supported for security fixes
only.  If this bug occurs in FC3 or FC4 and is a security bug, please change the
product to Fedora Extras and the version to match.  If you can verify that the
bug exists in RHEL as well, please change the product and version appropriately.

The codebase for pirut and pup is quite different, but if a similar bug exists
in pirut and pup in FC5 or FC6, please change the product to pirut and the
version appropriately and update the bug report.

We apologize that the bug was not fixed before now.  The status will be changed
to NEEDINFO, and if the bug is not updated with evidence that it is a security
bug or a bug that affects RHEL, it will be closed.
Comment 5 Ben Webb 2006-10-29 19:30:27 EST
I know that up2date was obsoleted in Fedora Core, and in fact we use yum with
FC6 these days, so are no longer affected by this bug.
Comment 6 John Thacker 2006-11-05 11:30:35 EST
Closing per previous message.

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