Red Hat Bugzilla – Bug 250425
Be able to turn off automatic cache rebuilds
Last modified: 2007-11-30 17:12:12 EST
Description of problem:
The following packages (at least) are installed in my x86_64 development mock
root by default but not in i386:
Also, the following (at least) are present in the i386 root but not listed here:
Version-Release number of selected component (if applicable):
Can you edit your mock config file for this chroot and set the debuglevel to 2,
and then do a mock -r <foo> init and attach the root.log from it?
Created attachment 160424 [details]
root.log from mock -r fedora-devel-x86_64 init
This appears to be unpacking a cached buildroot. Please remove the cached build
root and do a 'mock -r <foo> clean' before the init call.
Ah, didn't know about the cache. I do a lot of --no-clean builds and this must
be polluting my build root. How do I avoid this is the future?
You can disable autocaching in the config file, and maybe even the cli, I don't
I like the cache, I just want to be able to turn off the automatic rebuilding of
it because it gets polluted when doing --no-clean builds. Perhaps:
--- /usr/bin/mock.orig 2007-08-01 11:59:29.000000000 -0600
+++ /usr/bin/mock 2007-08-01 12:00:08.000000000 -0600
@@ -241,7 +241,7 @@
cache_mtime = os.stat(self.cache_file)[stat.ST_MTIME]
cache_age_days = (time.time() - cache_mtime) / (60 * 60 * 24)
- if cache_age_days > self.config['max_cache_age_days']:
+ if self.config['max_cache_age_days'] and cache_age_days >
self.config["rebuild_cache"] = True
if cache_exists and not self.config['rebuild_cache']:
Would allow you to set self.config['max_cache_age_days'] = 0 and turn that part off?
patch committed for $nextrelease.
Committed patch above along with a better one. If the build is not 'clean', it
will not rebuild the cache (ie. you specify --no-clean via cmdline or config file.)