[yum-commits] plugins/auto-update-debuginfo
skvidal at osuosl.org
skvidal at osuosl.org
Wed Oct 13 18:40:34 UTC 2010
plugins/auto-update-debuginfo/auto-update-debuginfo.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 7a3a6a51bfccaf543648e62c8f7f65204abbc2ad
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Wed Oct 13 14:39:25 2010 -0400
make all debuginfo repos enabled by auto-update-debuginfo be set to
skip_if_unavailable=True
Also change some variable names so I don't go blind when reading this code
trying to figure out if 'repos' is the repos object or something else.
diff --git a/plugins/auto-update-debuginfo/auto-update-debuginfo.py b/plugins/auto-update-debuginfo/auto-update-debuginfo.py
index 67722f7..6a20dde 100644
--- a/plugins/auto-update-debuginfo/auto-update-debuginfo.py
+++ b/plugins/auto-update-debuginfo/auto-update-debuginfo.py
@@ -25,22 +25,22 @@ requires_api_version = '2.1'
plugin_type = (TYPE_CORE,)
def enable_debuginfo_repos(yb, conduit):
- repos = {}
+ baserepos = {}
for repo in yb.repos.listEnabled():
- repos[repo.id] = repo
- for repoid in repos:
+ baserepos[repo.id] = repo
+ for repoid in baserepos:
di = '%s-debuginfo' % repoid
- if di in repos:
+ if di in baserepos:
continue
- repo = repos[repoid]
+ baserepo = baserepos[repoid]
for r in yb.repos.findRepos(di):
conduit.info(2, 'Enabling %s: %s' % (r.id, r.name))
r.enable()
+ r.skip_if_unavailable = True
# Note: This is shared with debuginfo-install
- for opt in ['repo_gpgcheck', 'gpgcheck', 'cost',
- 'skip_if_unavailable']:
+ for opt in ['repo_gpgcheck', 'gpgcheck', 'cost']:
if hasattr(r, opt):
- setattr(r, opt, getattr(repo, opt))
+ setattr(r, opt, getattr(baserepo, opt))
def prereposetup_hook(conduit):
yb = conduit._base
More information about the Yum-commits
mailing list