Blame SOURCES/0002-Add-support-for-setting-a-platform-module-ID.patch

f18df4
From 4f9a7a0eda7b5d30a5697b07809fc1a93cb976d1 Mon Sep 17 00:00:00 2001
f18df4
From: Neal Gompa <ngompa13@gmail.com>
f18df4
Date: Fri, 20 Nov 2020 06:01:16 -0500
f18df4
Subject: [PATCH] Add support for setting a platform module ID
f18df4
f18df4
Now that Micro DNF supports modularity, we need to be able to selectively
f18df4
override what it detects as the platform module when working with
f18df4
installroots that have modular content when they differ from the host.
f18df4
f18df4
nsella
f18df4
Note: the commit 7419ab465a04af525e39005e33ff869647c6bde2 was omitted
f18df4
---
f18df4
 dnf/dnf-main.c | 16 +++++++++++++++-
f18df4
 1 file changed, 15 insertions(+), 1 deletion(-)
f18df4
f18df4
diff --git a/dnf/dnf-main.c b/dnf/dnf-main.c
f18df4
index 6cb8c0e..2ea3d76 100644
f18df4
--- a/dnf/dnf-main.c
f18df4
+++ b/dnf/dnf-main.c
f18df4
@@ -131,6 +131,20 @@ process_global_option (const gchar  *option_name,
f18df4
                 }
f18df4
             }
f18df4
         }
f18df4
+      else if (strcmp (setopt[0], "module_platform_id") == 0)
f18df4
+        {
f18df4
+          const char *module_platform_id = setopt[1];
f18df4
+          if (module_platform_id[0] != '\0')
f18df4
+            {
f18df4
+              dnf_context_set_platform_module (ctx, module_platform_id);
f18df4
+            }
f18df4
+          else
f18df4
+            {
f18df4
+              local_error = g_error_new (G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE,
f18df4
+                                         "Empty value in: %s", value);
f18df4
+              ret = FALSE;
f18df4
+            }
f18df4
+        }
f18df4
       else if (strcmp (setopt[0], "cachedir") == 0)
f18df4
         {
f18df4
           cachedir_used = TRUE;
f18df4
@@ -212,7 +226,7 @@ static const GOptionEntry global_opts[] = {
f18df4
   { "refresh", '\0', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, &opt_refresh, "Set metadata as expired before running the command", NULL },
f18df4
   { "releasever", '\0', G_OPTION_FLAG_NONE, G_OPTION_ARG_CALLBACK, process_global_option, "Override the value of $releasever in config and repo files", "RELEASEVER" },
f18df4
   { "setopt", '\0', G_OPTION_FLAG_NONE, G_OPTION_ARG_CALLBACK, process_global_option,
f18df4
-    "Override a configuration option (install_weak_deps=0/1, cachedir=<path>, reposdir=<path1>,<path2>,..., tsflags=nodocs/test, varsdir=<path1>,<path2>,...)", "<option>=<value>" },
f18df4
+    "Override a configuration option (install_weak_deps=0/1, module_platform_id=<name:stream>, cachedir=<path>, reposdir=<path1>,<path2>,..., tsflags=nodocs/test, varsdir=<path1>,<path2>,...)", "<option>=<value>" },
f18df4
   { NULL }
f18df4
 };
f18df4
 
f18df4
-- 
f18df4
2.26.2
f18df4