|
|
fd1669 |
From 1335a0a08399960128192651011c4a3ca6233b32 Mon Sep 17 00:00:00 2001
|
|
|
fd1669 |
From: Daniel Mach <dmach@redhat.com>
|
|
|
fd1669 |
Date: Tue, 13 Nov 2018 12:17:58 +0100
|
|
|
fd1669 |
Subject: [PATCH] Enable repos when generating a .repo file based on
|
|
|
fd1669 |
entitlement certificate.
|
|
|
fd1669 |
|
|
|
fd1669 |
Resolves: rhbz#1638850
|
|
|
fd1669 |
---
|
|
|
fd1669 |
rhsm/rhsm-utils.c | 9 ++++++++-
|
|
|
fd1669 |
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
fd1669 |
|
|
|
fd1669 |
diff --git a/rhsm/rhsm-utils.c b/rhsm/rhsm-utils.c
|
|
|
fd1669 |
index 7b6a26b..021d0d8 100644
|
|
|
fd1669 |
--- a/rhsm/rhsm-utils.c
|
|
|
fd1669 |
+++ b/rhsm/rhsm-utils.c
|
|
|
fd1669 |
@@ -246,9 +246,16 @@ rhsm_utils_yum_repo_from_context (RHSMContext *ctx)
|
|
|
fd1669 |
const gchar *id = json_object_get_string_member (repo, "label");
|
|
|
fd1669 |
const gchar *name = json_object_get_string_member (repo, "name");
|
|
|
fd1669 |
const gchar *path = json_object_get_string_member (repo, "path");
|
|
|
fd1669 |
- gboolean enabled = FALSE;
|
|
|
fd1669 |
+
|
|
|
fd1669 |
+ /*
|
|
|
fd1669 |
+ * The "enabled" option defaults to "true".
|
|
|
fd1669 |
+ * If a content (repository) is enabled, the option is missing in the data,
|
|
|
fd1669 |
+ * most likely to save limited space in the certificate.
|
|
|
fd1669 |
+ */
|
|
|
fd1669 |
+ gboolean enabled = TRUE;
|
|
|
fd1669 |
if (json_object_has_member (repo, "enabled"))
|
|
|
fd1669 |
enabled = json_object_get_boolean_member (repo, "enabled");
|
|
|
fd1669 |
+
|
|
|
fd1669 |
if (id == NULL || name == NULL || path == NULL)
|
|
|
fd1669 |
continue; /* TODO: make some error reporting here */
|
|
|
fd1669 |
|