Red Hat Bugzilla – Bug 230483
pkgorder should not use persistent cache dir
Last modified: 2009-03-25 01:58:37 EDT
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):
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?
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.
Bah, the getCacheDir() stuff will reuse an existing one and not always do a
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.
User firstname.lastname@example.org's account has been closed
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.
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.