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

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