[yum-commits] 3 commits - yummain.py yum/repos.py yum/yumRepo.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Wed Oct 2 10:56:43 UTC 2013
yum/repos.py | 2 --
yum/yumRepo.py | 9 ++++++---
yummain.py | 8 ++++----
3 files changed, 10 insertions(+), 9 deletions(-)
New commits:
commit 359cdd30b1a89a7834da43ebc68e9aacd9a778a8
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Wed Oct 2 12:25:50 2013 +0200
Fix instructions for setting skip_if_unavailable
diff --git a/yummain.py b/yummain.py
index daac52a..fa76af8 100755
--- a/yummain.py
+++ b/yummain.py
@@ -97,7 +97,7 @@ def main(args):
slower). If it is a very temporary problem though, this is often a nice
compromise:
- yum-config-manager --save --setopt=%(repoid)s.skip_if_unavailable=true %(repoid)s
+ yum-config-manager --save --setopt=%(repoid)s.skip_if_unavailable=true
""")
repoui = _('Unknown')
commit 2e29377d4e305401e1023e9992f09eae29ca8aea
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Mon Sep 30 11:45:19 2013 +0200
Fix the "repo failed" message formatting.
diff --git a/yummain.py b/yummain.py
index f0b29ff..daac52a 100755
--- a/yummain.py
+++ b/yummain.py
@@ -70,13 +70,13 @@ def main(args):
def exRepoError(e):
# For RepoErrors ... help out by forcing new repodata next time.
+ # XXX: clean only the repo that has failed?
base.cleanExpireCache()
msg = _("""\
One of the configured repositories failed (%(repo)s),
-and yum doesn't have enough cached data to continue. At this point the only
-afe thing yum can do is fail.
- There are a few ways to work "fix" this:
+ and yum doesn't have enough cached data to continue. At this point the only
+ safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
commit 9823f2a91567ce6524a4011f002500d0c1c83781
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Mon Sep 30 10:18:41 2013 +0200
Set repo_error.repo attr also when filelists DL fails.
sqlitesack code does not do sack.populateSack(mdtype='filelists')
but iterates enabled repos so we don't set the .repo attribute.
Fix this by setting the attr when exception is raised.
diff --git a/yum/repos.py b/yum/repos.py
index 5d6bc99..67ef1e4 100644
--- a/yum/repos.py
+++ b/yum/repos.py
@@ -88,7 +88,6 @@ class RepoStorage:
dl = repo._async and repo._commonLoadRepoXML(repo)
except Errors.RepoError, e:
if not repo.skip_if_unavailable:
- e.repo = repo
raise
self.disableRepo(repo.id)
dl = False
@@ -386,7 +385,6 @@ class RepoStorage:
if mdtype in ['all', 'metadata'] and repo.skip_if_unavailable:
self.disableRepo(repo.id)
else:
- e.repo = repo
raise
else:
self.pkgSack.addSack(repo.id, sack)
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index b98d3cf..e371676 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -1003,8 +1003,9 @@ Insufficient space in download directory %s
except URLGrabError, e:
self._del_dl_file(local, size)
errstr = "failed to retrieve %s from %s\nerror was %s" % (relative, self, e)
- raise Errors.RepoError, errstr
-
+ e = Errors.RepoError(errstr)
+ e.repo = self
+ raise e
else:
headers = tuple(self.__headersListFromDict(cache=cache))
@@ -1023,7 +1024,9 @@ Insufficient space in download directory %s
self._del_dl_file(local, size)
errstr = "failure: %s from %s: %s" % (relative, self, e)
errors = getattr(e, 'errors', None)
- raise Errors.NoMoreMirrorsRepoError(errstr, errors)
+ e = Errors.NoMoreMirrorsRepoError(errstr, errors)
+ e.repo = self
+ raise e
return result
__get = _getFile
More information about the Yum-commits
mailing list