Bug 140832 - Yum is unable to update itself; reports "/etc/yum.conf is needed by package yum"
Summary: Yum is unable to update itself; reports "/etc/yum.conf is needed by package yum"
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
URL: http://www.fedoraforum.org/forum/show...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-25 10:50 UTC by Vesselin Peev
Modified: 2014-01-21 22:50 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-11-30 06:11:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch should resolve this and bug 281 (4.26 KB, patch)
2004-11-25 16:09 UTC, Seth Vidal
no flags Details | Diff

Description Vesselin Peev 2004-11-25 10:50:47 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0

Description of problem:
Yum is unable to update itself.

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

How reproducible:
Always

Steps to Reproduce:
Here's how I got the problem. Note that some of the steps you may do
differently to get the problem, but this is exactly how I got it.
To reproduce the problem quicker, you may want to just add the ATRPMS
yum repository to your /etc/yum.repos.d and try "yum update" because
ATRPMS is the repository that currently holds the new yum package that
the old yum has to update itself to (if you have not updated it already).

Now here is the detailed procedure:

(It uses Fedora i386):

1. Install Fedora 3 Final from ISOs (I did an installation that
requires only the first 3 CDs)
2. Fully update the system via up2date.
3. Restart and boot to the new kernel.
4. Copy the following repos files to /etc/yum.repos.d (Do not modify
the original yum.conf)

*** Contents of file dag.repo:

[dag]
name=Dag
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag/
enabled=1
gpgcheck=1

*** Contents of file dries.repo:

[dries]
name=Extra Fedora rpms dries - $releasever - $basearch
baseurl=http://apt.sw.be/dries/fedora/linux/$releasever/$basearch/dries/RPMS/
enabled=1
gpgcheck=1

*** Contents of file flash-plugin.repo:

[flash-plugin]
name=macromedia.mplug.org - Flash Plugin
baseurl=http://macromedia.mplug.org/apt/fedora/$releasever
  http://sluglug.ucsc.edu/macromedia/apt/fedora/$releasever
  http://ruslug.rutgers.edu/macromedia/apt/fedora/$releasever
  http://macromedia.rediris.es/apt/fedora/$releasever
enabled=1
gpgcheck=0

*** Contents of file freshrpms.repo:

[core]
name=FreshRPMS-Core
baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/core
enabled=1
gpgcheck=1

#[extras]
#name=Fedora Linux $releasever - $basearch - extras
#baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/extras
enabled=0
gpgcheck=1

#[alternatives]
#name=Fedora Linux $releasever - $basearch - alternatives
#baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/alternatives
enabled=0
gpgcheck=1

[updates]
name=FreshRPMS-Updates
baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/updates
enabled=1
gpgcheck=1

[freshrpms]
name=FreshRPMS-Fresh
baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms
enabled=1
gpgcheck=1


*** Contents of file newrpms.repo:

[newrpms]
name=Fedora Core $releasever - $basearch - newrpms
baseurl=http://newrpms.sunsite.dk/apt/redhat/en/$basearch/fc$releasever
enabled=1
gpgcheck=1


6. Import the digital signatures for the respective yum repositories
above.

7. Do a "yum update" followed by "/usr/sbin/prelink -ua".

8. Reboot.

9. Add the following file to the yum repository files in /etc/yum.repos.d:

*** Contents of file atrpms.repo:

[at-stable]
name=ATrpms for Fedora Core $releasever stable
baseurl=http://apt.atrpms.net/fedora/$releasever/en/$basearch/at-stable
enabled=1
gpgcheck=1

[at-good]
name=ATrpms for Fedora Core $releasever good
baseurl=http://apt.atrpms.net/fedora/$releasever/en/$basearch/at-good
enabled=1
gpgcheck=1

[at-testing]
name=ATrpms for Fedora Core $releasever testing
baseurl=http://apt.atrpms.net/fedora/$releasever/en/$basearch/at-testing
enabled=0
gpgcheck=1

[at-bleeding]
name=ATrpms for Fedora Core $releasever bleeding
baseurl=http://apt.atrpms.net/fedora/$releasever/en/$basearch/at-bleeding
enabled=0
gpgcheck=1

10. You will get the error "Missing dependency: /etc/yum.conf is
needed by package yum".

In "Additional Information" I have described a workaround for the
problem, but it is not clear whether when a new yum is released, the
problem won't occur again -- thus we have to make sure that the
problem is fixed in the current yum version that I managed to install
successfully by the workaround.

Actual Results:  Yum gives out:
"Missing dependency: /etc/yum.conf is needed by package yum"

Expected Results:  The old (installed) yum should have been able to
update itself to the new version and the above missing dependency
should not have appeared.

Additional info:

I succeeded in working around the problem, but if the problem is not
fixed, it's going to crop up when the new yum is released, too.

Here are the steps to fix the problem:

1. Run "yum update" and note the exact "yum" package that your current
yum wants to update to, but cannot because of the "yum.conf" missing
dependency. In my case it was:
yum-2.1.11-3_42.rhfc3.at.noarch which I found at
http://atrpms.net/dist/fc3/yum/yum-2.1.11-3_42.rhfc3.at.noarch.rpm

2. Run "yum clean all" to clear the yum cache -- that may save you
trouble with the new version of yum.
It also fixed a problem that occurred lated (and which seems
unrelated), of up2date and yum not wanting to download updates
reported correctly by the red up2date notification icon.

3. Back up your existing yum.conf (no need to worry about any files in
yum.repos.d when you do the next steps). If you don't back it up the
next step will remove it and you'll have to find it from somewhere.

4. Manually download the new yum, e.g.:
"wget http://atrpms.net/dist/fc3/yum/yum-2.1.11-3_42.rhfc3.at.noarch.rpm"

5. Use rpm to manually remove your currently installed yum by running
"rpm -e --no-deps yum"
Then verify that yum is uninstalled by running "yum list installed
yum". No yum package should show up.

6. Use rpm to manually install the new yum that you just downloaded:
"rpm -iv --no-deps yum-2.1.11-3_42.rhfc3.at.noarch.rpm"
Note the --no-deps option -- you'll still get the complain without it.

7. Since yum.conf would be missing in /etc/yum, copy it back in place
from your backed up copy in step 3. Otherwise yum will complain it
cannot find any configuration.
Also, you can verify that /etc/yum.repos.d is intact, holding all
files you have put there.

Comment 1 Vesselin Peev 2004-11-25 11:04:03 UTC
Minor clarification:
Step 10 says:

"You will get the error "Missing dependency: /etc/yum.conf is
needed by package yum"

... when you run "yum update"


Comment 2 Vesselin Peev 2004-11-25 15:16:20 UTC
Follow-up: I have just tried today (November 25th) the exact
abovedescribed steps on a completely different system, and got the
same problem again.

Final minor corrections:
Steps 1 in Additional Info should read "yum update yum" instead of
"yum update". Step 5 in Additional info should read "rpm -e yum"
(without the --nodeps option).

Comment 3 Vesselin Peev 2004-11-25 15:30:03 UTC
Are you aware of this bug? http://bugzilla.atrpms.net/show_bug.cgi?id=281

I can confirm it, too -- in step 10 you will get libFLAC, libxml2_2,
and libasound dependencies missing in addition to the the "missing"
/etc/yum.conf dependency.

Should I file that as a separate bug or you will do that for me, since
the steps to reproduce are the same as what I have described?



Comment 4 Seth Vidal 2004-11-25 16:08:43 UTC
Okay I've found the problem for both the bugs mentioned here.

i've attached a patch but it might not work w/o some other new changes.




Comment 5 Seth Vidal 2004-11-25 16:09:31 UTC
Created attachment 107463 [details]
patch should resolve this and bug 281

Comment 6 Seth Vidal 2004-11-30 06:11:30 UTC
This is tested and fixed in yum 2.1.12 - due out in rawhide and other
repos soonish.

One more thing, I wanted to thank you for the detailed and complete
error report. It was extremely invaluable in finding this problem.

Comment 7 Vesselin Peev 2004-11-30 09:39:59 UTC
I installed your new yum 2.1.12 via the manual method above, because 
the old problematic behaviour caused clashes, but that should not 
happen again with your solution.

Being a programmer, I know that without a detailed explanation you 
would have had to waste time with unnecessary testing and possibily 
working around the problem to better understand it. I am very 
satisfied that you found it useful. Next time I'll try a better bug 
report. Best wishes with your future work.

Comment 8 Jonas Printzen 2005-01-12 19:51:23 UTC
Hey, ggod work and all that...:)

One question. I have ended up in a fix where I can't
update my system because of the above bug.
Also I can't compile, ABI problem....

Is there a 'for commoners' work around to get out of this fix?


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