[master 1/1] allow repo with only a name if it's a pre-defined one (#1277638)
AdamWill
installerbot-noreply at redhat.com
Tue Nov 3 21:52:13 UTC 2015
From: Adam Williamson <awilliam at redhat.com>
this recently-added check is too broad; a repo without a URL
or mirrorlist is allowed if the name is one of the pre-defined
repos in /etc/anaconda.repos.d , and in fact this style is
specifically mentioned in the documentation, as the way to
use one of the pre-defined-but-disabled-by-default repos.
---
pyanaconda/packaging/dnfpayload.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py
index 820f20c..f51d74a 100644
--- a/pyanaconda/packaging/dnfpayload.py
+++ b/pyanaconda/packaging/dnfpayload.py
@@ -876,8 +876,9 @@ def updateBaseRepo(self, fallback=True, checkmount=True):
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"
+ if not (ksrepo.mirrorlist or ksrepo.baseurl or ksrepo.name in self._base.repos):
+ raise packaging.PayloadSetupError("Repository %s has no mirror or baseurl set "
+ "and is not one of the pre-defined repositories"
% ksrepo.name)
self._add_repo(ksrepo)
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/0d66817a56eb42ebc135b68f3e33c1f79ba2104b
More information about the anaconda-patches
mailing list