librhsm/SOURCES/4.patch

29 lines
1.1 KiB
Diff
Raw Normal View History

2020-01-21 15:42:21 +00:00
From 3d7519f2ac9e9f6e0978bc0cfebee6fa56190480 Mon Sep 17 00:00:00 2001
From: Pavla Kratochvilova <pkratoch@redhat.com>
Date: Wed, 20 Mar 2019 18:45:16 +0100
Subject: [PATCH] Generate repofile for any architecture if "ALL" is specified
(RhBug:1645318)
The "arches" array can contain special value "ALL" and in that case any
architecture should be accepted.
https://bugzilla.redhat.com/show_bug.cgi?id=1645318
---
rhsm/rhsm-utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rhsm/rhsm-utils.c b/rhsm/rhsm-utils.c
index 7b6a26b..0c8df57 100644
--- a/rhsm/rhsm-utils.c
+++ b/rhsm/rhsm-utils.c
@@ -230,7 +230,8 @@ rhsm_utils_yum_repo_from_context (RHSMContext *ctx)
if (json_object_has_member (repo, "arches"))
{
JsonArray *arr = json_object_get_array_member (repo, "arches");
- if (!rhsm_json_array_contains_string (arr, ctx_arch))
+ if (!rhsm_json_array_contains_string (arr, ctx_arch)
+ && !rhsm_json_array_contains_string (arr, "ALL"))
continue;
}