[Yum] cachedir ignored?

James Antill james-yum at and.org
Thu Nov 12 15:45:46 UTC 2009


Paul Howarth <paul at city-fan.org> writes:

> Perhaps I'm missing something obvious here but I'm trying to get yum,
> running as a non-root user with a custom config file, to cache data
> somewhere other than under /var/tmp.
>
> I'm running repoclosure checks on a bunch of different repos and have
> these entries in my yum config files:
>
> cachedir=/home/paul/lib/repoc/cache
> persistdir=/home/paul/lib/repoc/lib
>
> However, nothing is stored in either of these directories and instead
> I get directory /var/tmp/yum-paul-<6-random-characters> filling up
> with a few gigabytes of cache data that I'd rather store elsewhere and
> not fill up the /var partition.
>
> How can I get yum to put this data where I want it?

 The cachedir variable in the yum.conf is intended to be for where the
system (aka. root) puts the cache. We could do an access check in
YumBase.setCacheDir() ... but that'd be prone to weird failures, I
think, if root ever used it too.

 After creating the dir. in /var/tmp/yum-paul-* yum will reuse that
dir. ... so you could do a symlink to where you want it stored.
 I guess we could make the /var/tmp bit configurable. Feel free to
open an RFE.

-- 
James Antill -- james at and.org


More information about the Yum mailing list