[master 1/1] Fix Repository New_Repository has no mirror or baseurl (#1215963)
jkonecny12
installerbot-noreply at redhat.com
Thu Jul 9 09:42:43 UTC 2015
From: Jiri Konecny <jkonecny at redhat.com>
Source spoke is set to error state instead of crash with empty
repository.
Resolves: rhbz#1215963
---
pyanaconda/packaging/dnfpayload.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py
index 906c4c7..818eac4 100644
--- a/pyanaconda/packaging/dnfpayload.py
+++ b/pyanaconda/packaging/dnfpayload.py
@@ -767,6 +767,13 @@ def updateBaseRepo(self, fallback=True, checkmount=True):
repo.enable()
for ksrepo in self.data.repo.dataList():
+ log.debug("repo %s: mirrorlist %s, baseurl %s",
+ ksrepo.name, ksrepo.mirrorlist, ksrepo.baseurl)
+ # one of these must be set to create new repo
+ if not (ksrepo.mirrorlist or ksrepo.baseurl):
+ raise packaging.PayloadSetupError("Repository %s has no mirror or baseurl set"
+ % ksrepo.name)
+
self._add_repo(ksrepo)
ksnames = [r.name for r in self.data.repo.dataList()]
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/fa2864861174f410bf95e1ed746d5768bedae5cc
More information about the anaconda-patches
mailing list