[RFC] in progress: autocache patch

Michael_E_Brown at Dell.com Michael_E_Brown at Dell.com
Tue May 16 20:13:46 UTC 2006


A couple of notes:
 
Credit should be given to Jochen Schmitt for his original patch:
http://www.redhat.com/archives/fedora-extras-list/2005-November/msg00169
.html
    My mock-helper changes are straight from Jochen Schmitt's patch. 
    All mock.py changes are mine, with inspiration from Jochen's patch.
 
New Config options:
    There are several new config options that can be placed in the mock
config file to control caching. See the additions to
setup_default_config_opts() for details, they should be relatively
self-explanatory. Note that "cache_topdir" is concatenated with
"basedir" with os.path.join(). This means that if cache_topdir begins
with a /, it will completely override basedir.
--
Michael


________________________________

	From: fedora-buildsys-list-bounces at redhat.com
[mailto:fedora-buildsys-list-bounces at redhat.com] On Behalf Of
Michael_E_Brown at Dell.com
	Sent: Tuesday, May 16, 2006 2:53 PM
	To: fedora-buildsys-list at redhat.com
	Subject: [RFC] in progress: autocache patch
	
	

	        Here is my current autocache patch for comments. I have
two features left to implement: 1) permissions on tarballs, and 2)
ability to select compressed/uncompressed tarballs.

	Usage: 
	        There are two added command line options. First is
"--autocache". You should be able to just add this command line option
to all mock invocations to automatically and transparently speed up
operations. It will automatically build cache the first time it is
invoked. It will automatically use the cache if it exists. It will
automatically expire the cache and rebuild it on a periodic basis. The
second option is "--rebuildcache". This option is for the rare occasions
when you would like to force a rebuild of the cache.

	Theory: 
	        The theory behind this patch is that it will
automatically untar the buildroot from a tarball, if the tarball exists.
It will automatically create the tarball if it does not exist (only when
--autocache is specified). The tarball has an expiration date, default
is 15 days. After the tarball is older than this, it will automatically
be rebuilt.

	Test results: 
	        Initial testing with FC5 yum repo mirror on local
network and squid proxy running on local machine resulted in a "init" of
the build root at 2:20. Using an already-cached build root takes this
time down to 0:13.

	-- 
	Michael 

	<<mock-autocache.patch>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-buildsys-list/attachments/20060516/e81748bb/attachment.htm>


More information about the Fedora-buildsys-list mailing list