Bug 175436

Summary: Mirrorlists for distinct repositories get appended
Product: [Fedora] Fedora Reporter: Mary Ellen Foster <mefoster>
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: katzj, sundaram
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-12-14 19:10:59 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
My yum.conf
none
fedora-devel.repo
none
fedora-extras-devel.repo
none
Possible patch
none
Updated patch none

Description Mary Ellen Foster 2005-12-10 14:41:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051129 Fedora/1.5-1 Firefox/1.5

Description of problem:
It looks like multiple repo directories in /var/cache/yum have for some reason got the same primary.xml.gz file in them. This means that, for example, yum proposes using a jpackage repo as the source for updating Fedora Core packages such as the kernel and ALSA. Then, since the packages aren't signed (because it's rawhide), the update fails because it thinks they're coming from a jpackage repo while has gpgcheck=1.

I'll post the trace of my failed attempt in a follow-up message, as it's a bit long. But it looks like this was all caused by the development primary.xml.gz also being copied into the jpackage repo directories:

mef@floopy[/var/cache/yum] % ls -l */primary.xml.gz
-rw-r--r-- 1 root root 1258728 Dec 10 10:30 development/primary.xml.gz
-rw-r--r-- 1 root root    5805 Dec 10 14:23 extras-development/primary.xml.gz
-rw-r--r-- 1 root root     157 Dec  7 18:07 jpackage-devel-fc/primary.xml.gz
-rw-r--r-- 1 root root  139091 Dec  7 18:06 jpackage-devel-generic/primary.xml.gz
-rw-r--r-- 1 root root 1258728 Dec 10 10:30 jpackage-fc/primary.xml.gz
-rw-r--r-- 1 root root 1258579 Dec  8 10:31 jpackage-generic-nonfree/primary.xml.gz
-rw-r--r-- 1 root root 1258728 Dec 10 10:30 jpackage-generic/primary.xml.gz
-rw-r--r-- 1 root root  196117 Dec  7 06:23 livna/primary.xml.gz
-rw-r--r-- 1 root root    1186 Oct 25 15:58 skype/primary.xml.gz

Note the several files with size 1258728 -- they're all identical, too, according to diff, and I think that's actually the file from devel.

I'll save a copy of my /var/cache/yum directory, run "yum clean all", and try again to do the update, and it'll probably work.

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

How reproducible:
Always

Steps to Reproduce:
1. Run "yum update kernel\* alsa\*"


Actual Results:  Proposes to download development packages from jpackage repos

Expected Results:  Should get them from development repos

Additional info:

Comment 1 Mary Ellen Foster 2005-12-10 14:43:47 UTC
Here's the trace of my attempted update. Note that it successfully downloads the
alsa and kernel packages, even though it says it's getting them from jpackage
repos. (I have the FC4 jpackage repos enabled on my FC5T1 system.)

% sudo yum update kernel\* alsa\*
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
development               100% |=========================| 1.1 kB    00:00
skype                     100% |=========================|  951 B    00:00
jpackage-fc               100% |=========================| 1.1 kB    00:00
jpackage-devel-generic    100% |=========================|  951 B    00:00
livna                     100% |=========================|  951 B    00:00
jpackage-devel-fc         100% |=========================|  951 B    00:00
extras-development        100% |=========================|  951 B    00:00
jpackage-generic          100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 5.7 kB    00:00
extras-dev: ################################################## 25/25
Added 25 new packages, deleted 2679 old in 1.69 seconds
Excluding Packages from JPackage (free) for Fedora Core 4.90
Finished
Excluding Packages from JPackage development (free), generic
Finished
Excluding Packages from JPackage development (free) for Fedora Core 4.90
Finished
Excluding Packages from JPackage (free), generic
Finished
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package alsa-lib-devel.i386 0:1.0.10rf-3 set to be updated
---> Downloading header for alsa-lib to pack into transaction set.
alsa-lib-1.0.10rf-3.i386. 100% |=========================|  18 kB    00:00
---> Package alsa-lib.i386 0:1.0.10rf-3 set to be updated
---> Downloading header for kernel-smp-devel to pack into transaction set.
kernel-smp-devel-2.6.14-1 100% |=========================| 812 kB    00:05
---> Package kernel-smp-devel.i686 0:2.6.14-1.1750_FC5 set to be installed
---> Downloading header for kernel-smp to pack into transaction set.
kernel-smp-2.6.14-1.1750_ 100% |=========================| 191 kB    00:01
---> Package kernel-smp.i686 0:2.6.14-1.1750_FC5 set to be installed
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 kernel-smp              i686       2.6.14-1.1750_FC5  jpackage-generic   14 M
 kernel-smp-devel        i686       2.6.14-1.1750_FC5  jpackage-generic  4.2 M
Updating:
 alsa-lib                i386       1.0.10rf-3       jpackage-fc       367 k
 alsa-lib-devel          i386       1.0.10rf-3       development       1.4 M
Removing:
 kernel-smp              i686       2.6.14-1.1740_FC5  installed          44 M
 kernel-smp-devel        i686       2.6.14-1.1740_FC5  installed          13 M

Transaction Summary
=============================================================================
Install      2 Package(s)
Update       2 Package(s)
Remove       2 Package(s)
Total download size: 20 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): kernel-smp-devel-2 100% |=========================| 4.2 MB    00:25
(2/4): kernel-smp-2.6.14- 100% |=========================|  14 MB    01:23
(3/4): alsa-lib-1.0.10rf- 100% |=========================| 367 kB    00:02
(4/4): alsa-lib-devel-1.0 100% |=========================| 1.4 MB    00:08


Package kernel-smp-devel-2.6.14-1.1750_FC5.i686.rpm is not signed


Comment 2 Mary Ellen Foster 2005-12-10 14:53:07 UTC
I just ran "yum clean all" and it doesn't seem to have changed the set of
primary.xml.gz files -- they're still timestamped 10:30 today, and the same ones
are identical. I then tried the same update command, and yum still seems to be
confused. Here's the list of packages it proposed this time (not the
"extras-development" source for alsa):

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 kernel-smp              i686       2.6.14-1.1750_FC5  development        14 M
 kernel-smp-devel        i686       2.6.14-1.1750_FC5  development       4.2 M
Updating:
 alsa-lib                i386       1.0.10rf-3       extras-development  367 k
 alsa-lib-devel          i386       1.0.10rf-3       extras-development  1.4 M
Removing:
 kernel-smp              i686       2.6.14-1.1740_FC5  installed          44 M
 kernel-smp-devel        i686       2.6.14-1.1740_FC5  installed          13 M

Transaction Summary
=============================================================================


Comment 3 Rahul Sundaram 2005-12-10 15:09:21 UTC
If you are running Fedora Core development version you will have to disable all
the FC4 related repositories since they are not in sync. Only the development
and extras development repository is used in the test versions. Rest of the
third party repositories may not be in sync and it will likely break.

It seems that the jpackage repositories you have installed are either broken or
you have misconfigured them. This is not a bug related to yum or any of the
packages supplied in Fedora. 


Comment 4 Mary Ellen Foster 2005-12-10 16:03:17 UTC
I don't think so ... I think it's actually a bug with mirrorlists. They seem to
accumulate across repostiories, rather than being set separately for each repo.

I deleted /var/cache/yum/*, enabled only development and extras-development, and
tried "yum -d5 makecache". Here's an excerpt from the trace:

-----
Setting up repositories
Baseurl(s) for repo:
['http://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/',
'http://mirror.hiwaay.net/redhat/fedora/linux/core/development/i386/',
'http://ftp.dulug.duke.edu/pub/fedora/linux/core/development/i386/',
'http://mirrors.kernel.org/fedora/core/development/i386/',
'http://sunsite.mff.cuni.cz/pub/fedora/development/i386/',
'http://distro.ibiblio.org/pub/linux/distributions/fedora/linux/core/development/i386/']
development               100% |=========================| 1.1 kB    00:00
Baseurl(s) for repo:
['http://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/',
'http://mirror.hiwaay.net/redhat/fedora/linux/core/development/i386/',
'http://ftp.dulug.duke.edu/pub/fedora/linux/core/development/i386/',
'http://mirrors.kernel.org/fedora/core/development/i386/',
'http://sunsite.mff.cuni.cz/pub/fedora/development/i386/',
'http://distro.ibiblio.org/pub/linux/distributions/fedora/linux/core/development/i386/',
'http://download.fedora.redhat.com/pub/fedora/linux/extras/development/i386/',
'http://mirrors.kernel.org/fedora/extras/development/i386/',
'http://fedora.cat.pdx.edu/linux/extras/development/i386/',
'http://fedora.gtlib.cc.gatech.edu/pub/fedora.redhat/linux/extras/development/i386/',
'http://fr2.rpmfind.net/linux/fedora/extras/development/i386/',
'http://fr.rpmfind.net/linux/fedora/extras/development/i386/',
'http://ftp.chg.ru/pub/Linux/fedora/linux/extras/development/i386/',
'http://ftp.kddilabs.jp/Linux/packages/fedora/extras/development/i386/',
'http://ftp.lug.ro/fedora/linux/extras/development/i386/',
'http://ftp-stud.fht-esslingen.de/pub/Mirrors/fedora.redhat.com/linux/extras/development/i386/',
'http://ftp.uni-bayreuth.de/linux/fedora/linux/extras/development/i386/',
'http://gd.tuwien.ac.at/opsys/linux/fedora/extras/development/i386/',
'http://mirror.hiwaay.net/redhat/fedora/linux/extras/development/i386/',
'http://mirror.switch.ch/ftp/mirror/fedora/linux/extras/development/i386/',
'http://mirror.web-ster.com/fedora/extras/development/i386/',
'http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/fedora/linux/extras/development/i386/']
extras-development        100% |=========================| 1.1 kB    00:00
-----

Look at the baseurl list for extras-development; it also contains all of the
URLs for the regular devel repo. In this particular example, it still chose an
extras  mirror to update its cache, but I could imagine it not working properly
every time.

Reopening and changing summary ...

Comment 5 Seth Vidal 2005-12-10 16:14:52 UTC
the information we need here is your yum.conf and your yum.repos.d/*.repo files

thanks

Comment 6 Mary Ellen Foster 2005-12-10 16:22:37 UTC
Created attachment 122095 [details]
My yum.conf

Here's my yum.conf. The only change to the stock version is the change to
metadata_expire. I'll attach my two enabled .repo files in a second, but
they're unmodified from those distributed with FC5T1 too, as far as I can tell.

Comment 7 Mary Ellen Foster 2005-12-10 16:23:19 UTC
Created attachment 122096 [details]
fedora-devel.repo

Comment 8 Mary Ellen Foster 2005-12-10 16:24:01 UTC
Created attachment 122097 [details]
fedora-extras-devel.repo

Comment 9 Seth Vidal 2005-12-10 16:27:50 UTC
That can't be all your .repo files. In the output posted in Comment #1 above it
lists:

development 
skype       
jpackage-fc 
jpackage-devel-generic 
livna                 
jpackage-devel-fc     
extras-development    
jpackage-generic      
extras-dev

Where are the .repo files for those?


Comment 10 Mary Ellen Foster 2005-12-10 16:31:38 UTC
For a reduced test case, I removed all of my .repo files except for the two I
just attached, and I still see the issue as described in Comment #4. Just using
the two default repositories, the mirrorlists seem to get appended rather than
replaced. I think the additional repositories weren't the source of the problem;
they just made it more evident.

Comment 11 Mary Ellen Foster 2005-12-10 17:08:14 UTC
Created attachment 122098 [details]
Possible patch

The attached patch seems to fix it, by explicitly initialising the self.baseurl
field before it's appended to. Take it with a grain of salt, though -- I don't
know much about python (understatement!!).

Comment 12 Mary Ellen Foster 2005-12-10 17:21:26 UTC
Created attachment 122099 [details]
Updated patch

Okay, whoops, that previous patch broke non-mirrorlist repos. Try this one
instead.

Comment 13 Mary Ellen Foster 2005-12-14 14:48:58 UTC
Still an issue in today's yum-2.5.0-1 release. Should I post this at yum's
bugzilla as well?

Comment 14 Jeremy Katz 2005-12-14 18:03:03 UTC
No, I just didn't quite get to looking at the patch closely last night and
wanted to make sure that 2.5.0 made it into rawhide.  It's on my "this
afternoon" list

Comment 15 Jeremy Katz 2005-12-14 19:10:59 UTC
Fixed differently for -2.  Your patch works for the simple case, but more
generally, the config handling wasn't doing the right thing here so I fixed it
more generally.