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