cache plugin behavior?

Clark Williams williams at redhat.com
Fri Feb 29 21:13:10 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Clark Williams wrote:
> Michael E Brown wrote:
>> On Fri, Feb 29, 2008 at 09:58:35AM -0600, Clark Williams wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Michael,
>>>
>>> I was looking at BZ  233529 on mock and was wondering if the requested behavior seems
>>> valid (it does to me, just wanted a sanity check).
>>>
>>> As far as I can tell, the only time the root cache is invalidated is when it ages out
>>> (was looking at the plugin). 
>> This is correct.
> 
>>> Does it make sense to also invalidate the cache when the
>>> .cfg that defines it has a newer modification time?
>> Makes perfect sense. May be somewhat difficult to implement, I'm not
>> sure we store the config file name anywhere that the plugin can get to
>> it. 
>> --
>> Michael
> 
> Here's a way to do it.
> 
> One thing that wasn't immediately apparent to me, but became clear when I started
> installing/debugging was that everytime you install a new mock rpm, the cfg file will
> have a timestamp newer than any existing root-cache file, which means with this patch
> each root-cache will be rebuilt. This seems like a reasonable thing to do (rebuild
> the caches after installing a new mock), but I wonder if it will break anything?
> 
> Clark
> 

Michael,

Following our IRC conversation, where you expressed admiration and unreserved joy at
the ability to update the cache after an install (maybe I overstate a bit), I
modified the patch to check the timestamp of both the config file and the
site-default.cfg file. I think this does the job in that after an install, the cache
is rebuilt because of an updated site-defaults.cfg and if you touch the config file
it's also detected.

Clark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkfIdWYACgkQHyuj/+TTEp1mFQCg2Ckelz5scAG73j+nSBJxxzS2
2cAAoN60hJOAcBF0x1UlFxWVtQM9M1pt
=Vutc
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cache-mod-take2.patch
URL: <http://listman.redhat.com/archives/fedora-buildsys-list/attachments/20080229/84c2420a/attachment.ksh>


More information about the Fedora-buildsys-list mailing list