Red Hat Bugzilla – Full Text Bug Listing
|Summary:||pkgorder should not use persistent cache dir|
|Product:||Red Hat Enterprise Linux 5||Reporter:||Jos Vos <jos>|
|Component:||yum||Assignee:||James Antill <james.antill>|
|Status:||CLOSED NOTABUG||QA Contact:|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2009-03-25 01:58:37 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
Description Jos Vos 2007-02-28 17:51:12 EST
Description of problem: When running pkgorder (or buildinstall, calling pkgorder) multiple times with different repository contents (i.e. replacing packages), it seems to get confused and it ignores the new packages. This is probably due to the fact that the "anaconda" repos info is kept in /var/cache/yum. The anaconda repos is defined in the temporary yum.conf file created by pkgorder and multiple anaconda repositories should not be related to each other using the same cache. Version-Release number of selected component (if applicable): 22.214.171.124-1
Comment 1 Jeremy Katz 2007-03-01 11:27:13 EST
That shouldn't be the case -- we get a temporary cache dir under /var/tmp to use for all of the repo information in pkgorder (see cachedir = yum.misc.getCacheDir()) Can you try to get a better idea of what's going wrong?
Comment 2 Jos Vos 2007-03-03 10:09:38 EST
What if /var/yum/cache already contains info about a repo named "anaconda"? Would that maybe be used anyway? What I did was, while testing, a "yum -c tmp.conf ...", similar to the temporary conf file in pkgorder, so this created info for "anaconda" in /var/cache/yum. What I remember (not 100% sure anymore): - Runnning pkgorder for a repo -> output ok. - Replacing two packages in the repo by new releases (same package names/versions, different release number). - Running createrepo. - Running pkgorder again -> output list is missing the two new packages I just replaced (also the old versions are not listed). - Adapting pkgorder to include "cachedir=/dev/null" in the temporary yum.conf file and/or "rm -rf /var/cache/yum/anaconda" solved the problem. To be sure about what actually solved the problem, I need to redo the whole sequence and see if I can reproduce it.
Comment 3 Jeremy Katz 2007-03-05 15:37:12 EST
Bah, the getCacheDir() stuff will reuse an existing one and not always do a tempdir.
Comment 4 Jos Vos 2007-05-19 11:33:13 EDT
When I "rm -rf /var/tmp/yum-*" before calling buildinstall/pkgorder, everything works fine. I saw that the /var/tmp/yum-root-.../anaconda/headers directory contained the *sum* of two totally different repos header sets for which I once had called pkgorder :-(. The second run of pkgorder got completely confused, ran for 30 minutes or so, and produced incomplete output.
Comment 5 Red Hat Bugzilla 2007-08-21 01:32:12 EDT
User firstname.lastname@example.org's account has been closed
Comment 6 James Antill 2008-04-18 10:17:28 EDT
wth ... I don't even know what pkgorder is ... but it sounds like it's abusing getCacheDir(). One of the points of that function is that it's stable across multiple runs, so that people don't have to re-download their repo. MD each time they run a command. You could set your metadata_expire to 0, so that the yum code will check it. But I can't see a good case for yum deleting the cache dir. This needs to be assigned to someone/something else or closed NaB, from what I can see right now.
Comment 7 James Antill 2009-03-25 01:58:37 EDT
closing due to none responce ... but the 5.4 errata will have the getCacheDir() changes requested by Jesse. So you can make truley temporary directories now.