Blame SOURCES/0001-Revert-Dont-set-default-value-of-assumeyes-to-TRUE.patch

7ba71c
From f60d1b6930b4602a24ae2ce4078795268384c87d Mon Sep 17 00:00:00 2001
7ba71c
From: Pavla Kratochvilova <pkratoch@redhat.com>
7ba71c
Date: Thu, 20 May 2021 11:06:27 +0200
7ba71c
Subject: [PATCH] Revert "Don't set default value of "assumeyes" to TRUE"
7ba71c
7ba71c
This reverts commit 9e028a51fea6eceee0de6e155374a0bd81289e14.
7ba71c
---
7ba71c
 dnf/dnf-main.c | 10 ++++++++++
7ba71c
 1 file changed, 10 insertions(+)
7ba71c
7ba71c
diff --git a/dnf/dnf-main.c b/dnf/dnf-main.c
7ba71c
index 661dfee..cfaf714 100644
7ba71c
--- a/dnf/dnf-main.c
7ba71c
+++ b/dnf/dnf-main.c
7ba71c
@@ -595,6 +595,14 @@ main (int   argc,
7ba71c
         {
7ba71c
           dnf_conf_main_set_option ("assumeyes", DNF_CONF_COMMANDLINE, "1", NULL);
7ba71c
         }
7ba71c
+      else
7ba71c
+        {
7ba71c
+          enum DnfConfPriority priority;
7ba71c
+          dnf_utils_conf_main_get_bool_opt ("assumeyes", &priority);
7ba71c
+          /* microdnf has a default value for "assumeyes" equal to TRUE, backward compatibility */
7ba71c
+          if (priority == DNF_CONF_DEFAULT)
7ba71c
+            dnf_conf_main_set_option ("assumeyes", DNF_CONF_COMMANDLINE, "1", NULL);
7ba71c
+        }
7ba71c
     }
7ba71c
 
7ba71c
   const gchar *cmd_name = get_command (&argc, argv);
7ba71c
@@ -609,6 +617,8 @@ main (int   argc,
7ba71c
       g_set_prgname (prg_name);
7ba71c
       g_autofree gchar *help = g_option_context_get_help (opt_ctx, TRUE, NULL);
7ba71c
       g_print ("%s", help);
7ba71c
+      g_print ("Notes:\n");
7ba71c
+      g_print ("  The \"--assumeyes\" option is turned on by default. To switch it to an interactive prompt, specify \"assumeyes=0\" in the configuration file.\n\n");
7ba71c
       goto out;
7ba71c
     }
7ba71c
 
7ba71c
--
7ba71c
libgit2 1.0.1
7ba71c