Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Repository New_Repository has no mirror or baseurl (#1215963) #128

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions pyanaconda/packaging/dnfpayload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()]
Expand Down
2 changes: 2 additions & 0 deletions pyanaconda/ui/gui/spokes/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,8 @@ def on_addRepo_clicked(self, button):
self._repoSelection.select_iter(itr)
self._repoEntryBox.set_sensitive(True)

self._repoURLChecks[repo].update_check_status()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Python 3 repo is not hashable and we use repo.name as the key. Just please sync with @M4rtinK to make sure whatever goes last has this glitch fixed.


def on_removeRepo_clicked(self, button):
""" Remove the selected repository
"""
Expand Down