[yum-commits] 2 commits - docs/yum.conf.5 yum/config.py yum/misc.py yum/yumRepo.py
James Antill
james at osuosl.org
Wed Dec 4 15:23:41 UTC 2013
docs/yum.conf.5 | 12 ++++++++++++
yum/config.py | 5 +++++
yum/misc.py | 5 +++--
yum/yumRepo.py | 3 +++
4 files changed, 23 insertions(+), 2 deletions(-)
New commits:
commit a88b3ee54bd6f3b7c6855e0595d443fa6a453798
Author: James Antill <james at and.org>
Date: Sun Dec 1 19:41:18 2013 -0500
Better doc. comment for re_primary_filename().
diff --git a/yum/misc.py b/yum/misc.py
index b817cc0..f551102 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -134,8 +134,9 @@ def re_filename(s):
def re_primary_filename(filename):
""" Tests if a filename string, can be matched against just primary.
- Note that this can produce false negatives (but not false
- positives). Note that this is a superset of re_primary_dirname(). """
+ Note that this can produce false negatives (Eg. /b?n/zsh) but not false
+ positives (because the former is a perf hit, and the later is a
+ failure). Note that this is a superset of re_primary_dirname(). """
if re_primary_dirname(filename):
return True
if filename == '/usr/lib/sendmail':
commit b70d74e732f360a0a31cfcb9174982fb65369c54
Author: James Antill <james at and.org>
Date: Wed Nov 27 14:00:32 2013 -0500
Add check_config_file_age, so we can turn that off for rhsm repos. BZ 1035440.
diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
index 4e79298..da13dc8 100644
--- a/docs/yum.conf.5
+++ b/docs/yum.conf.5
@@ -290,6 +290,18 @@ installed.
Command-line option: \fB\-\-installroot\fP
.IP
+\fBconfig_file_path \fR
+Specifies the path to main the configuration file.
+Default is /etc/yum/yum.conf.
+
+.IP
+\fBcheck_config_file_age \fR
+Either `0' or `1'. Specifies whether yum should auto metadata expire repos.
+that are older than any of the configuration files that led to them (usually
+the yum.conf file and the foo.repo file).
+Default is `1' (perform the check).
+
+.IP
\fBdistroverpkg\fR
The package used by yum to determine the "version" of the distribution, this
sets $releasever for use in config. files. This
diff --git a/yum/config.py b/yum/config.py
index ea6c1ac..c38d574 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -901,6 +901,8 @@ class YumConf(StartupConf):
autocheck_running_kernel = BoolOption(True)
+ check_config_file_age = BoolOption(True)
+
_reposlist = []
def dump(self):
@@ -1005,6 +1007,9 @@ class RepoConf(BaseConfig):
async = BoolOption(True)
ui_repoid_vars = Inherit(YumConf.ui_repoid_vars)
+
+ check_config_file_age = Inherit(YumConf.check_config_file_age)
+
class VersionGroupConf(BaseConfig):
"""Option definitions for version groups."""
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 67bb7c9..35359e2 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -1170,6 +1170,9 @@ Insufficient space in download directory %s
elif cookie_info[8] > time.time():
val = False
+ if not self.check_config_file_age:
+ return val
+
# make sure none of our config files for this repo are newer than
# us
if cookie_info[8] < int(self.repo_config_age):
More information about the Yum-commits
mailing list