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
skip_if_unavailable=True fixes #231
Conversation
This paves the way for the following patch.
We're using GKeyFile for parsing .repo files, but the syntax isn't a 100% match. This commit adds a helper to correctly handle "True" and "False" that aren't valid GKeyFile booleans but are valid for .repo files.
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that the rhsm exception should be in here. Please put that into #202 instead with an rhsm/spacewalk plugin.
} else { | ||
g_autofree gchar *basename = g_path_get_basename(priv->filename); | ||
/* special case the satellite and subscription manager repo */ | ||
if (g_strcmp0(basename, "redhat.repo") == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be part of a libdnf plugin instead of in libdnf itself, shouldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, and it can do as a separate PR, but this is just groundwork for an actual crash fix.
Parse the "skip_if_unavailable" key and set the DnfRepo "required" property accordingly.
This ensures that dnf_sack_add_repo() correctly skips skip_if_unavailable repos when the gpg key download fails. https://bugzilla.redhat.com/show_bug.cgi?id=1383819
ccbd2eb
to
6c9efda
Compare
These look great! +1 from me. |
@dnf-bot r+ |
📌 Commit 6c9efda has been approved by |
We're using GKeyFile for parsing .repo files, but the syntax isn't a 100% match. This commit adds a helper to correctly handle "True" and "False" that aren't valid GKeyFile booleans but are valid for .repo files. Closes: #231 Approved by: hughsie
Parse the "skip_if_unavailable" key and set the DnfRepo "required" property accordingly. Closes: #231 Approved by: hughsie
This ensures that dnf_sack_add_repo() correctly skips skip_if_unavailable repos when the gpg key download fails. https://bugzilla.redhat.com/show_bug.cgi?id=1383819 Closes: #231 Approved by: hughsie
☀️ Test successful - status-jenkins |
This patch set makes PackageKit work better for repos that have skip_if_unavailable=True set in their .repo files, as is the case for COPR repos. COPR repos are often short lived and as such it's important to correctly handle possible inaccessible repos.
https://bugzilla.redhat.com/show_bug.cgi?id=1383819