Red Hat Bugzilla – Bug 160576
up2date fails to install RPMs from file:// URLs with IndexError
Last modified: 2008-08-02 19:40:33 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):
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.
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.
"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.
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.
in my case i have found the solution.
i'm disabling the proxy of my firewall and all works fine.
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).
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.
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.
Closing per previous message.