|
|
885e9e |
From 5923a9cc15b9fe541e71a9ef4bb550b6ddc481fc Mon Sep 17 00:00:00 2001
|
|
|
885e9e |
From: Jaroslav Rohel <jrohel@redhat.com>
|
|
|
885e9e |
Date: Wed, 12 Jun 2019 13:22:31 +0200
|
|
|
885e9e |
Subject: [PATCH] [context] Fix: Don't disable nonexistent but required repositories (RhBug:1689331)
|
|
|
885e9e |
|
|
|
885e9e |
The nonexistent local/media repositories were automatically disabled
|
|
|
885e9e |
during check (in function dnf_repo_check_internal). So application
|
|
|
885e9e |
(the Packagekit daemon) that reuses the deactivated repository object
|
|
|
885e9e |
then silently skip the repository as disabled.
|
|
|
885e9e |
|
|
|
885e9e |
We should not to disable repositories which are required
|
|
|
885e9e |
(skip_if_unavailable=0).
|
|
|
885e9e |
|
|
|
885e9e |
Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1689331
|
|
|
885e9e |
---
|
|
|
885e9e |
libdnf/dnf-repo.cpp | 6 ++++--
|
|
|
885e9e |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
885e9e |
|
|
|
885e9e |
diff --git a/libdnf/dnf-repo.cpp b/libdnf/dnf-repo.cpp
|
|
|
885e9e |
index d49c306..a358356 100644
|
|
|
885e9e |
--- a/libdnf/dnf-repo.cpp
|
|
|
885e9e |
+++ b/libdnf/dnf-repo.cpp
|
|
|
885e9e |
@@ -1312,7 +1312,8 @@ dnf_repo_check_internal(DnfRepo *repo,
|
|
|
885e9e |
/* has the media repo vanished? */
|
|
|
885e9e |
if (priv->kind == DNF_REPO_KIND_MEDIA &&
|
|
|
885e9e |
!g_file_test(priv->location, G_FILE_TEST_EXISTS)) {
|
|
|
885e9e |
- priv->enabled = DNF_REPO_ENABLED_NONE;
|
|
|
885e9e |
+ if (!dnf_repo_get_required(repo))
|
|
|
885e9e |
+ priv->enabled = DNF_REPO_ENABLED_NONE;
|
|
|
885e9e |
g_set_error(error,
|
|
|
885e9e |
DNF_ERROR,
|
|
|
885e9e |
DNF_ERROR_REPO_NOT_AVAILABLE,
|
|
|
885e9e |
@@ -1323,7 +1324,8 @@ dnf_repo_check_internal(DnfRepo *repo,
|
|
|
885e9e |
/* has the local repo vanished? */
|
|
|
885e9e |
if (priv->kind == DNF_REPO_KIND_LOCAL &&
|
|
|
885e9e |
!g_file_test(priv->location, G_FILE_TEST_EXISTS)) {
|
|
|
885e9e |
- priv->enabled = DNF_REPO_ENABLED_NONE;
|
|
|
885e9e |
+ if (!dnf_repo_get_required(repo))
|
|
|
885e9e |
+ priv->enabled = DNF_REPO_ENABLED_NONE;
|
|
|
885e9e |
g_set_error(error,
|
|
|
885e9e |
DNF_ERROR,
|
|
|
885e9e |
DNF_ERROR_REPO_NOT_AVAILABLE,
|
|
|
885e9e |
--
|
|
|
885e9e |
libgit2 0.28.2
|
|
|
885e9e |
|