From 95d2e7bb87526157ec703c0d48bd8b311d16697f Mon Sep 17 00:00:00 2001
From: Joshua Watt <JPEWhacker@gmail.com>
Date: Tue, 12 Nov 2019 08:54:23 -0600
Subject: [PATCH 2/3] Remove --configure-args option
The --configure-args option isn't really required because the
information it was intended to report can be found more readily with `mc
-F`. Additionally, embedding the configure arguments can lead to
non-reproducible builds, particularly when cross-compiling as it
embeds paths into the executable.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
configure.ac | 2 --
doc/man/es/mc.1.in | 3 ---
doc/man/mc.1.in | 3 ---
doc/man/ru/mc.1.in | 3 ---
src/args.c | 15 ---------------
src/textconf.c | 7 -------
src/textconf.h | 1 -
7 files changed, 34 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6abe53100..d9028bc9a 100644
a
|
b
|
dnl Clarify do we really need GModule |
546 | 546 | AM_CONDITIONAL([HAVE_GMODULE], [test -n "$g_module_supported" && \ |
547 | 547 | test x"$textmode_x11_support" = x"yes" -o x"$enable_aspell" = x"yes"]) |
548 | 548 | |
549 | | AC_DEFINE_UNQUOTED([MC_CONFIGURE_ARGS], ["$ac_configure_args"], [MC configure arguments]) |
550 | | |
551 | 549 | AC_CONFIG_FILES( |
552 | 550 | [ |
553 | 551 | src/man2hlp/man2hlp |
diff --git a/doc/man/es/mc.1.in b/doc/man/es/mc.1.in
index 68644ceb5..28dbec7e1 100644
a
|
b
|
Usado para especificar un juego de colores diferentes desde la línea de |
48 | 48 | Colores\&. |
49 | 49 | .\"Colors" |
50 | 50 | .TP |
51 | | .I \-\-configure\-options |
52 | | Muestra opciones de configuración compiladas. |
53 | | .TP |
54 | 51 | .I \-d, \-\-nomouse |
55 | 52 | Deshabilita el soporte de ratón. |
56 | 53 | .TP |
diff --git a/doc/man/mc.1.in b/doc/man/mc.1.in
index cfc34e0ab..2b301503b 100644
a
|
b
|
Colors |
37 | 37 | .\"Colors" |
38 | 38 | section. |
39 | 39 | .TP |
40 | | .I \-\-configure\-options |
41 | | Display configure options. |
42 | | .TP |
43 | 40 | .I \-d, \-\-nomouse |
44 | 41 | Disable mouse support. |
45 | 42 | .TP |
diff --git a/doc/man/ru/mc.1.in b/doc/man/ru/mc.1.in
index 547b8fdfb..309c0648c 100644
a
|
b
|
UNIX\-подобных операционных системах. |
41 | 41 | Цвета\&. |
42 | 42 | .\"Colors" |
43 | 43 | .TP |
44 | | .I \-\-configure\-options |
45 | | Выводит опции конфигурирования, с которыми был собран Midnight Commander. |
46 | | .TP |
47 | 44 | .I \-d, \-\-nomouse |
48 | 45 | Отключает поддержку мыши. |
49 | 46 | .TP |
diff --git a/src/args.c b/src/args.c
index baef1a1c8..52f478c59 100644
a
|
b
|
static gboolean mc_args__nouse_subshell = FALSE; |
95 | 95 | #endif /* ENABLE_SUBSHELL */ |
96 | 96 | static gboolean mc_args__show_datadirs = FALSE; |
97 | 97 | static gboolean mc_args__show_datadirs_extended = FALSE; |
98 | | static gboolean mc_args__show_configure_opts = FALSE; |
99 | 98 | |
100 | 99 | static GOptionGroup *main_group; |
101 | 100 | |
… |
… |
static const GOptionEntry argument_main_table[] = { |
125 | 124 | NULL |
126 | 125 | }, |
127 | 126 | |
128 | | /* show configure options */ |
129 | | { |
130 | | "configure-options", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, |
131 | | &mc_args__show_configure_opts, |
132 | | N_("Print configure options"), |
133 | | NULL |
134 | | }, |
135 | | |
136 | 127 | { |
137 | 128 | "printwd", 'P', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING, |
138 | 129 | &mc_args__last_wd_file, |
… |
… |
mc_args_show_info (void) |
758 | 749 | return FALSE; |
759 | 750 | } |
760 | 751 | |
761 | | if (mc_args__show_configure_opts) |
762 | | { |
763 | | show_configure_options (); |
764 | | return FALSE; |
765 | | } |
766 | | |
767 | 752 | return TRUE; |
768 | 753 | } |
769 | 754 | |
diff --git a/src/textconf.c b/src/textconf.c
index 1e0613e58..82e238f82 100644
a
|
b
|
show_datadirs_extended (void) |
232 | 232 | |
233 | 233 | /* --------------------------------------------------------------------------------------------- */ |
234 | 234 | |
235 | | void |
236 | | show_configure_options (void) |
237 | | { |
238 | | (void) printf ("%s\n", MC_CONFIGURE_ARGS); |
239 | | } |
240 | | |
241 | | /* --------------------------------------------------------------------------------------------- */ |
diff --git a/src/textconf.h b/src/textconf.h
index 9e039ae14..616dc12e2 100644
a
|
b
|
|
17 | 17 | |
18 | 18 | extern void show_version (void); |
19 | 19 | extern void show_datadirs_extended (void); |
20 | | extern void show_configure_options (void); |
21 | 20 | |
22 | 21 | /*** inline functions ****************************************************************************/ |
23 | 22 | #endif /* MC__TEXTCONF_H */ |