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

skip_if_unavailable=True fixes #231

Closed
wants to merge 4 commits into from
Closed

skip_if_unavailable=True fixes #231

wants to merge 4 commits into from

Conversation

kalev
Copy link
Collaborator

@kalev kalev commented Dec 15, 2016

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

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.
@dnf-bot
Copy link
Member

dnf-bot commented Dec 15, 2016

Can one of the admins verify this patch?

Copy link
Member

@Conan-Kudo Conan-Kudo left a 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)
Copy link
Member

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?

Copy link
Contributor

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
@hughsie
Copy link
Contributor

hughsie commented Dec 15, 2016

These look great! +1 from me.

@hughsie
Copy link
Contributor

hughsie commented Dec 15, 2016

@dnf-bot r+

@dnf-bot
Copy link
Member

dnf-bot commented Dec 15, 2016

📌 Commit 6c9efda has been approved by hughsie

@dnf-bot
Copy link
Member

dnf-bot commented Dec 15, 2016

⌛ Testing commit 6c9efda with merge ccd2e28...

dnf-bot pushed a commit that referenced this pull request Dec 15, 2016
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
dnf-bot pushed a commit that referenced this pull request Dec 15, 2016
Parse the "skip_if_unavailable" key and set the DnfRepo "required"
property accordingly.

Closes: #231
Approved by: hughsie
dnf-bot pushed a commit that referenced this pull request Dec 15, 2016
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
@dnf-bot
Copy link
Member

dnf-bot commented Dec 15, 2016

☀️ Test successful - status-jenkins
Approved by: hughsie
Pushing ccd2e28 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants