Re: cachedir ignored?

Paul Howarth <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
On 12/11/09 15:45, James Antill wrote:
> Paul Howarth<[email protected]>  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.

OK, done.

http://yum.baseurl.org/ticket/337

I considered the symlink approach but didn't like it as I'd need to 
manually fix up that symlink every time I do a fresh install on that 
system (which I do every time there's a new fedora release), and the 
name isn't predictable, which precludes a scripted approach. So a means 
of directly configuring the directory name would be much better.

Cheers, Paul.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.