diff options
| author | Clark Williams <williams@redhat.com> | 2007-08-02 10:35:51 -0500 |
|---|---|---|
| committer | Clark Williams <williams@redhat.com> | 2007-08-02 10:35:51 -0500 |
| commit | 515d313e7d352bfdf04434b3c5321ccba2a82080 (patch) | |
| tree | 66094ba796896a53a14dd9e43c418b20c1818d75 | |
| parent | 05a1f425123b3c7e211a5d187b1bf024da620969 (diff) | |
| parent | a2fbe5b9aa9df9e55393b82b7efdba91acc38a8e (diff) | |
Merge branch 'master' of git+ssh://jcwillia@git.fedoraproject.org/git/hosted/mock
| -rw-r--r-- | etc/defaults.cfg | 5 | ||||
| -rw-r--r-- | mock.py | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/etc/defaults.cfg b/etc/defaults.cfg index 9af8095..cce1648 100644 --- a/etc/defaults.cfg +++ b/etc/defaults.cfg @@ -27,3 +27,8 @@ #config_opts['cache_topdir'] = "root-cache" #config_opts['max_cache_age_days'] = 15 +## to add new rpmmacros, you need to follow special syntax or mock breaks: +#config_opts['macros'] = config_opts['macros'] + """ +#%%_my_special_rpm_macro value +#""" + @@ -241,7 +241,7 @@ class Root: if cache_exists: 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['max_cache_age_days']: self.config["rebuild_cache"] = True if cache_exists and not self.config['rebuild_cache']: @@ -250,7 +250,9 @@ class Root: cmd = 'update' else: cmd = '%s' % self.config['chroot_setup_cmd'] - create_cache = 1 + # never rebuild cache unless it was a clean build. + if self.config['clean']: + create_cache = 1 else: if self.config['clean']: cmd = '%s' % self.config['chroot_setup_cmd'] |
