Skip to contentSkip to conversation

PROBLEM: "Make nenuconfig" does not save parameters.

DISCUSSION Vladimir 5 participants 23 messages Mar 10, 2007 – Mar 18, 2007 1 message not in the archive Kconfig

lore
Share & tools
lore

Vladimir

author
#0 lore raw

Here's the problem:
1. Unpack the kernel sources, run make menuconfig.
2. Mark the necessary options.
3. Pick "Save an alternate configuration file", enter a filename (e.g. /root/kernelcfg)
4. Pick "Exit".
->5. Configurator exits without saving. If type "make bzImage", it builtd all the default options.

And there's no ".config" file in kernel root directory, so i have to move there my "kernelcfg" and rename it.

If i just run "make menuconfig", then pick "Exit", then it asks "Save kernel configuration?".

This happens starting from kernel 2.6.20 till 2.6.20.2
Slackware-current.
PC: Athlon-XP 2000+, 256 MB RAM.
Linux wolf 2.6.20.2 #1 SMP PREEMPT Sat Mar 10 15:41:42 MSK 2007 i686 athlon-4 i386 GNU/Linux

Signature · 1 line
Faith manages.
#1 lore raw

[Vladimir - Sat, Mar 10, 2007 at 04:05:42PM +0300]

| Here's the problem:
|   1. Unpack the kernel sources, run make menuconfig.
|   2. Mark the necessary options.
|   3. Pick "Save an alternate configuration file", enter a filename (e.g. /root/kernelcfg)
|   4. Pick "Exit".
| ->5. Configurator exits without saving. If type "make bzImage", it builtd all the default options.
| 
| And there's no ".config" file in kernel root directory, so i have to move there my "kernelcfg" and
| rename it.
| 
| If i just run "make menuconfig", then pick "Exit", then it asks "Save kernel configuration?".
| 
| This happens starting from kernel 2.6.20 till 2.6.20.2
| Slackware-current.
| PC: Athlon-XP 2000+, 256 MB RAM.
| Linux wolf 2.6.20.2 #1 SMP PREEMPT Sat Mar 10 15:41:42 MSK 2007 i686 athlon-4 i386 GNU/Linux
| -- 
| Faith manages.

Let us time to review... :)

Cyrill

#2 lore raw
In reply to Vladimir

[Vladimir - Sat, Mar 10, 2007 at 04:05:42PM +0300]

| Here's the problem:
|   1. Unpack the kernel sources, run make menuconfig.
|   2. Mark the necessary options.
|   3. Pick "Save an alternate configuration file", enter a filename (e.g. /root/kernelcfg)
|   4. Pick "Exit".
| ->5. Configurator exits without saving. If type "make bzImage", it builtd all the default options.
| 
| And there's no ".config" file in kernel root directory, so i have to move there my "kernelcfg" and
| rename it.
| 
| If i just run "make menuconfig", then pick "Exit", then it asks "Save kernel configuration?".
| 
| This happens starting from kernel 2.6.20 till 2.6.20.2
| Slackware-current.
| PC: Athlon-XP 2000+, 256 MB RAM.
| Linux wolf 2.6.20.2 #1 SMP PREEMPT Sat Mar 10 15:41:42 MSK 2007 i686 athlon-4 i386 GNU/Linux
| -- 
| Faith manages.
| -
| 

Hi, Vladimir

here is the patch to resolve your problem. Test it and write me the results...

Cyrill

scripts/kconfig/confdata.c +1 -2
index 664fe29..98836b6 100644
@@ -432,8 +432,7 @@ int conf_write(const char *name)
 		     use_timestamp ? "# " : "",
 		     use_timestamp ? ctime(&now) : "");
 
-	if (!conf_get_changed())
-		sym_clear_all_valid();
+	sym_clear_all_valid();
 
 	menu = rootmenu.list;
 	while (menu) {
scripts/kconfig/mconf.c +4 -1
index 3f9a132..ea32df8 100644
@@ -840,8 +840,11 @@ static void conf_save(void)
 		case 0:
 			if (!dialog_input_result[0])
 				return;
-			if (!conf_write(dialog_input_result))
+			res = conf_get_changed(); /* temporary used */
+			if (!conf_write(dialog_input_result)) {
+				sym_set_change_count(res);
 				return;
+			}
 			show_textbox(NULL, _("Can't create file!  Probably a nonexistent directory."), 5, 60);
 			break;
 		case 1:
#3 lore raw
Quoted 7 lines · Cyrill Gorcunov

[Vladimir - Sat, Mar 10, 2007 at 04:05:42PM +0300]

| Here's the problem:
|   1. Unpack the kernel sources, run make menuconfig.
|   2. Mark the necessary options.
|   3. Pick "Save an alternate configuration file", enter a filename (e.g. /root/kernelcfg)
|   4. Pick "Exit".
| ->5. Configurator exits without saving. If type "make bzImage", it builtd all the default options.

Well, you already saved explicitly and did not make any further changes after that, so it won't ask again on exit (perhaps all Office Suites do the same). In fact, if you do exactly that, menuconfig assumes you do not intend to build a kernel (since you did not save to .config).

Jan

#4 lore raw

[Jan Engelhardt - Sat, Mar 10, 2007 at 05:26:03PM +0100]

| 
| On Mar 10 2007 19:06, Cyrill Gorcunov wrote:
| >[Vladimir - Sat, Mar 10, 2007 at 04:05:42PM +0300]
| >| Here's the problem:
| >|   1. Unpack the kernel sources, run make menuconfig.
| >|   2. Mark the necessary options.
| >|   3. Pick "Save an alternate configuration file", enter a filename (e.g. /root/kernelcfg)
| >|   4. Pick "Exit".
| >| ->5. Configurator exits without saving. If type "make bzImage", it builtd all the default options.
| 
| Well, you already saved explicitly and did not make any further changes
| after that, so it won't ask again on exit (perhaps all Office Suites do
| the same). In fact, if you do exactly that, menuconfig assumes you do not
| intend to build a kernel (since you did not save to .config).
| 
| 
| Jan
| -- 
| 

Hi, Jan

so you think that is a normal behaviour? I mean sould we leave all as it is?

Cyrill

#5 lore raw
Quoted 15 lines · Cyrill Gorcunov

[Jan Engelhardt - Sat, Mar 10, 2007 at 05:26:03PM +0100]

| On Mar 10 2007 19:06, Cyrill Gorcunov wrote:
| >[Vladimir - Sat, Mar 10, 2007 at 04:05:42PM +0300]
| >| Here's the problem:
| >|   1. Unpack the kernel sources, run make menuconfig.
| >|   2. Mark the necessary options.
| >|   3. Pick "Save an alternate configuration file", enter a filename (e.g. /root/kernelcfg)
| >|   4. Pick "Exit".
| >| ->5. Configurator exits without saving. If type "make bzImage", it builtd all the default options.
| 
| Well, you already saved explicitly and did not make any further changes
| after that, so it won't ask again on exit (perhaps all Office Suites do
| the same). In fact, if you do exactly that, menuconfig assumes you do not
| intend to build a kernel (since you did not save to .config).
Quoted 4 lines

Hi, Jan

so you think that is a normal behaviour? I mean sould we leave all as it is?

Yes. If you want to save your current configuration to two files, save it twice:

Save an alternate configuration file -> /root/kernelcfg Save an alternate configuration file -> <just enter, use .config>

Jan

#7 lore raw
In reply to a message not in the archive
Quoted 16 lines · Vladimir
Quoted 10 lines · Cyrill Gorcunov
Quoted 8 lines

[Vladimir - Sat, Mar 10, 2007 at 04:05:42PM +0300]

| Here's the problem:
|   1. Unpack the kernel sources, run make menuconfig.
|   2. Mark the necessary options.
|   3. Pick "Save an alternate configuration file", enter a filename (e.g. /root/kernelcfg)
|   4. Pick "Exit".
| ->5. Configurator exits without saving. If type "make bzImage", it builtd all the default

options.

Quoted 5 lines

Well, you already saved explicitly and did not make any further changes after that, so it won't ask again on exit (perhaps all Office Suites do the same). In fact, if you do exactly that, menuconfig assumes you do not intend to build a kernel (since you did not save to .config).

Quoted 4 lines

Hm.... Do i have to "Save an alternate configuration file" to ".config" manually? The configurator used to do that automatically when i pick "Exit". I think that was reasonable. Anyway, the patch Cyrill sent me works all right.

If you make some changes and do not call 'save an alternate config file', it will ask you on exit.

If you make no changes at all, a .config won't get written - true. But then, the defconfig will be used anyway.

All is fine.

Jan

#8 lore raw

[Jan Engelhardt - Sat, Mar 10, 2007 at 05:50:56PM +0100]

| On Mar 10 2007 19:46, Vladimir wrote:
| >> On Mar 10 2007 19:06, Cyrill Gorcunov wrote:
| >> >[Vladimir - Sat, Mar 10, 2007 at 04:05:42PM +0300]
| >> >| Here's the problem:
| >> >|   1. Unpack the kernel sources, run make menuconfig.
| >> >|   2. Mark the necessary options.
| >> >|   3. Pick "Save an alternate configuration file", enter a filename (e.g. /root/kernelcfg)
| >> >|   4. Pick "Exit".
| >> >| ->5. Configurator exits without saving. If type "make bzImage", it builtd all the default
| >> >options.
| >> 
| >> Well, you already saved explicitly and did not make any further 
| >> changes after that, so it won't ask again on exit (perhaps all Office 
| >> Suites do the same). In fact, if you do exactly that, menuconfig 
| >> assumes you do not intend to build a kernel (since you did not save 
| >> to .config).
| >
| >Hm.... Do i have to "Save an alternate configuration file" to ".config" 
| >manually? The configurator used to do that automatically when i pick 
| >"Exit". I think that was reasonable. Anyway, the patch Cyrill sent me 
| >works all right.
| 
| If you make some changes and do not call 'save an alternate config 
| file', it will ask you on exit.
| 
| If you make no changes at all, a .config won't get written - true. But 
| then, the defconfig will be used anyway.
| 
| All is fine.
| 
| 
| Jan

Jan

lets see to the following scenario:

1) I've taken a pure Linux kernel (no .config at all)
2) I started menuconfig, made a few changes and saved the file to .config1 as alternate
3) Then I made some additional changes
4) Then I'm getting out of menuconfig and of course "Save configuration..?" question is raising. Ok, I'm selecting "Yes" and as result new configuration will be written to the .config file. All works as it should be...

...but as you mentoined in your message "perhaps all Office Suites do the same" - no, Office do not the same. The only question I have (and it could resolve all our problems) - what an alternate config file is:

- just a snapshot of a config tree at moment of its writting
- _working_ file to which configurator should write parameters

your comments?

P.S.

Excuse for poor eng. grammar

Cyrill

#9 lore raw
Quoted 12 lines · Cyrill Gorcunov

lets see to the following scenario:

1) I've taken a pure Linux kernel (no .config at all)
2) I started menuconfig, made a few changes and saved the file to .config1 as alternate
3) Then I made some additional changes
4) Then I'm getting out of menuconfig and of course "Save configuration..?" question is raising. Ok, I'm selecting "Yes" and as result new configuration will be written to the .config file. All works as it should be...

Quoted 2 lines

...but as you mentoined in your message "perhaps all Office Suites do the same" - no, Office do not the same.

1) I start a new document
2) add some text, "save as" it to config1.txt
3) make more text
4) choose File,Exit - prompts me to save

(perhaps not to .config, but instead config1.txt, but at least, it prompts me, and gives me the choice to go back into menuconfig and save it under a different name). So what I just wanted to make clear is that you don't lose any changes without explicitly saying Don't Save.

Quoted 7 lines

The only question I have (and it could resolve all our problems) - what an alternate config file is:

- just a snapshot of a config tree at moment of its writting
- _working_ file to which configurator should write parameters

your comments?

Whether the 'working config file path' should change when you do 'Save as Alternate' or not, is a menuconfig axiom. Ask Sam Ravnborg if you want it changed :-)

[ I see where you are going. I am not biased to either because I usually
only use it to save to .config. ]

Jan

#10 lore raw

[Jan Engelhardt - Sat, Mar 10, 2007 at 07:23:41PM +0100]

| 
| On Mar 10 2007 20:50, Cyrill Gorcunov wrote:
| >
| >lets see to the following scenario:
| >
| >	1) I've taken a pure Linux kernel (no .config at all)
| >	2) I started menuconfig, made a few changes and saved the file
| >	to .config1 as alternate
| >	3) Then I made some additional changes
| >	4) Then I'm getting out of menuconfig and of course "Save
| >	configuration..?" question is raising. Ok, I'm selecting
| >	"Yes" and as result new configuration will be written to the .config
| >	file. All works as it should be...
| >	
| >...but as you mentoined in your message "perhaps all Office Suites do
| >the same" - no, Office do not the same.
| 
| 
| 	1) I start a new document
| 	2) add some text, "save as" it to config1.txt
| 	3) make more text
| 	4) choose File,Exit - prompts me to save
| 
| (perhaps not to .config, but instead config1.txt, but at least, it prompts

and there you hit the problem to the eye - when you're working with text document you always know in *which* file you're now. So if you've saved alternate config - _keep his name in mind_ - that's what menuconfig tell us...

| me, and gives me the choice to go back into menuconfig and save it under a
| different name). So what I just wanted to make clear is that you don't
| lose any changes without explicitly saying Don't Save.
| 
| >The only question I have (and it could resolve all our problems) - what an
| >alternate config file is:
| >
| >	- just a snapshot of a config tree at moment of its writting
| >	- _working_ file to which configurator should write parameters
| >
| >your comments?
| 
| Whether the 'working config file path' should change when you do
| 'Save as Alternate' or not, is a menuconfig axiom. Ask Sam Ravnborg
| if you want it changed :-)
| 
| [ I see where you are going. I am not biased to either because I usually
|   only use it to save to .config. ]
| 
| 
| 
| Jan
| -- 
| 

Actually, I always work with only .config file too... and the reason I wrote you is Vladimir's mail... so either menuconfig does not work as expected or users does not expect a such behaviour of menuconfig.

Cyrill

#11 lore raw
Quoted 4 lines · Cyrill Gorcunov

Actually, I always work with only .config file too... and the reason I wrote you is Vladimir's mail... so either menuconfig does not work as expected or users does not expect a such behaviour of menuconfig.

The latter. Though this behavior has been there since... I think since menuconfig came into existence. It goes way back to 2.4 and 2.2.

Jan

#12 lore raw

[Jan Engelhardt - Sat, Mar 10, 2007 at 08:04:38PM +0100]

| 
| On Mar 10 2007 21:50, Cyrill Gorcunov wrote:
| >
| >Actually, I always work with only .config file too... and the reason I
| >wrote you is Vladimir's mail... so either menuconfig does not work as
| >expected or users does not expect a such behaviour of menuconfig.
| 
| The latter. Though this behavior has been there since... I think since
| menuconfig came into existence. It goes way back to 2.4 and 2.2.
| 
| 
| Jan
| -- 
| 

Thanks for mail. The topic is closed :)

Cyrill

#13 lore raw
In reply to Jan Engelhardt
Quoted 4 lines · Jan Engelhardt

Whether the 'working config file path' should change when you do 'Save as Alternate' or not, is a menuconfig axiom. Ask Sam Ravnborg if you want it changed :-)

Current behaviour is not logical but on the other hand I do not see a big need to make it so.
It seems that people very seldom uses "save alternate" anyway.

But patches are welcome.

Sam

#14 lore raw
Quoted 11 lines · Sam Ravnborg
Quoted 4 lines · Jan Engelhardt

Whether the 'working config file path' should change when you do 'Save as Alternate' or not, is a menuconfig axiom. Ask Sam Ravnborg if you want it changed :-)

Current behaviour is not logical but on the other hand I do not see a big need to make it so.
It seems that people very seldom uses "save alternate" anyway.

But patches are welcome.

^_^ The patch has already been posted, has not it?

Jan

#15 lore raw
Quoted 8 lines · Jan Engelhardt
Quoted 6 lines · Sam Ravnborg
Quoted 4 lines · Jan Engelhardt

Whether the 'working config file path' should change when you do 'Save as Alternate' or not, is a menuconfig axiom. Ask Sam Ravnborg if you want it changed :-)

Quoted 7 lines
Quoted 5 lines

Current behaviour is not logical but on the other hand I do not see a big need to make it so.
It seems that people very seldom uses "save alternate" anyway.

But patches are welcome.

^_^ The patch has already been posted, has not it?

No.
Either we keep current behaviour or we change to the "normal" behaviour with a "Save as..." as know from all other programs.

Sam

#16 lore raw
Quoted 10 lines · Sam Ravnborg
Quoted 10 lines
Quoted 10 lines · Jan Engelhardt
Quoted 4 lines

Whether the 'working config file path' should change when you do 'Save as Alternate' or not, is a menuconfig axiom. Ask Sam Ravnborg if you want it changed :-)

Current behaviour is not logical but on the other hand I do not see a big need to make it so.
It seems that people very seldom uses "save alternate" anyway.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

But patches are welcome.

^_^ The patch has already been posted, has not it?

No.

http://lkml.org/lkml/2007/3/10/163 ? Not that I have tried it personally.

Quoted 2 lines

Either we keep current behaviour or we change to the "normal" behaviour with a "Save as..." as know from all other programs.

Jan

#17 lore raw
In reply to Sam Ravnborg

[Sam Ravnborg - Sat, Mar 10, 2007 at 11:45:34PM +0100]

| On Sat, Mar 10, 2007 at 10:34:41PM +0100, Jan Engelhardt wrote:
| > 
| > On Mar 10 2007 22:27, Sam Ravnborg wrote:
| > >On Sat, Mar 10, 2007 at 07:23:41PM +0100, Jan Engelhardt wrote:
| > >> 
| > >> Whether the 'working config file path' should change when you do
| > >> 'Save as Alternate' or not, is a menuconfig axiom. Ask Sam Ravnborg
| > >> if you want it changed :-)
| > >
| > >Current behaviour is not logical but on the other hand I do not
| > >see a big need to make it so.
| > >It seems that people very seldom uses "save alternate" anyway.
| > >
| > >But patches are welcome.
| > 
| > ^_^ The patch has already been posted, has not it?
| No.
| Either we keep current behaviour or we change to the "normal"
| behaviour with a "Save as..." as know from all other programs.
| 
| 	Sam
| 

Hi Sam,

I think we should use "Save As..." idea. And thereby menuconfig, qconfig, gconfig will be affected. Please give me time to make patches. (I'm a little busy now so I hope to make them during a week :)

The patch I sent to Vladimir does not normalize behaviour of config process but just makes an alternate file as a snapshot of current config state. You may review it as a temporary solution only.

Cyrill

#18 lore raw
In reply to Sam Ravnborg

[Sam Ravnborg - Sat, Mar 10, 2007 at 11:45:34PM +0100]

| On Sat, Mar 10, 2007 at 10:34:41PM +0100, Jan Engelhardt wrote:
| > 
| > On Mar 10 2007 22:27, Sam Ravnborg wrote:
| > >On Sat, Mar 10, 2007 at 07:23:41PM +0100, Jan Engelhardt wrote:
| > >> 
| > >> Whether the 'working config file path' should change when you do
| > >> 'Save as Alternate' or not, is a menuconfig axiom. Ask Sam Ravnborg
| > >> if you want it changed :-)
| > >
| > >Current behaviour is not logical but on the other hand I do not
| > >see a big need to make it so.
| > >It seems that people very seldom uses "save alternate" anyway.
| > >
| > >But patches are welcome.
| > 
| > ^_^ The patch has already been posted, has not it?
| No.
| Either we keep current behaviour or we change to the "normal"
| behaviour with a "Save as..." as know from all other programs.
| 
| 	Sam
| 

Hi Sam,

here is a patch for menuconfig that shows current configuration file. So I think menuconfig does its work well but the only thing we need is to show location of an _active_ configuration.

Any comments are welcome (and you may swear at me too :)

Cyrill

scripts/kconfig/mconf.c +15 -3
index 3f9a132..cde6792 100644
@@ -602,6 +602,12 @@ static void conf(struct menu *menu)
 			item_set_tag('L');
 			item_make(_("    Save an Alternate Configuration File"));
 			item_set_tag('S');
+			item_make("--- ");
+			item_set_tag(':');
+			item_make(_("    Current Configuration File: "));
+			item_set_tag(':');
+			item_add_str("%s", filename);
+
 		}
 		dialog_clear();
 		res = dialog_menu(prompt ? prompt : _("Main Menu"),
@@ -816,8 +822,11 @@ static void conf_load(void)
 		case 0:
 			if (!dialog_input_result[0])
 				return;
-			if (!conf_read(dialog_input_result))
+			if (!conf_read(dialog_input_result)) {
+				memset(filename, 0x0, PATH_MAX+1);
+				strncpy(filename, dialog_input_result, PATH_MAX);
 				return;
+			}
 			show_textbox(NULL, _("File does not exist!"), 5, 38);
 			break;
 		case 1:
@@ -840,8 +849,11 @@ static void conf_save(void)
 		case 0:
 			if (!dialog_input_result[0])
 				return;
-			if (!conf_write(dialog_input_result))
+			if (!conf_write(dialog_input_result)) {
+				memset(filename, 0x0, PATH_MAX+1);
+				strncpy(filename, dialog_input_result, PATH_MAX);
 				return;
+			}
 			show_textbox(NULL, _("Can't create file!  Probably a nonexistent directory."), 5, 60);
 			break;
 		case 1:
@@ -903,7 +915,7 @@ int main(int ac, char **av)
 
 	switch (res) {
 	case 0:
-		if (conf_write(NULL)) {
+		if (conf_write(filename)) {
 			fprintf(stderr, _("\n\n"
 				"Error during writing of the kernel configuration.\n"
 				"Your kernel configuration changes were NOT saved."
#19 lore raw
Quoted 24 lines · Cyrill Gorcunov

[Sam Ravnborg - Sat, Mar 10, 2007 at 11:45:34PM +0100]

| On Sat, Mar 10, 2007 at 10:34:41PM +0100, Jan Engelhardt wrote:
| > 
| > On Mar 10 2007 22:27, Sam Ravnborg wrote:
| > >On Sat, Mar 10, 2007 at 07:23:41PM +0100, Jan Engelhardt wrote:
| > >> 
| > >> Whether the 'working config file path' should change when you do
| > >> 'Save as Alternate' or not, is a menuconfig axiom. Ask Sam Ravnborg
| > >> if you want it changed :-)
| > >
| > >Current behaviour is not logical but on the other hand I do not
| > >see a big need to make it so.
| > >It seems that people very seldom uses "save alternate" anyway.
| > >
| > >But patches are welcome.
| > 
| > ^_^ The patch has already been posted, has not it?
| No.
| Either we keep current behaviour or we change to the "normal"
| behaviour with a "Save as..." as know from all other programs.
| 
| 	Sam
| 
Quoted 7 lines

Hi Sam,

here is a patch for menuconfig that shows current configuration file. So I think menuconfig does its work well but the only thing we need is to show location of an _active_ configuration.

Any comments are welcome (and you may swear at me too :)

I would rather avoid adding the extra lines. In the 'office-suite' fashion I have cooked up a patch that specify the filename as part of the windows title.

To make the conversion we should consider renaming from current "Load alternate" to "Open config file..." and likewise "Save alternate" to "Save config file as..."

Comments?

Sam

scripts/kconfig/lxdialog/dialog.h +1 -0
index fd695e1..7e17eba 100644
@@ -188,6 +188,7 @@ int on_key_esc(WINDOW *win);
 int on_key_resize(void);
 
 void init_dialog(const char *backtitle);
+void set_dialog_backtitle(const char *backtitle);
 void reset_dialog(void);
 void end_dialog(void);
 void attr_clear(WINDOW * win, int height, int width, chtype attr);
scripts/kconfig/lxdialog/util.c +5 -0
index d54440f..549373b 100644
@@ -272,6 +272,11 @@ void init_dialog(const char *backtitle)
 	color_setup(getenv("MENUCONFIG_COLOR"));
 }
 
+void set_dialog_backtitle(const char *backtitle)
+{
+	dlg.backtitle = backtitle;
+}
+
 void reset_dialog(void)
 {
 	initscr();		/* Init curses */
scripts/kconfig/mconf.c +31 -12

99 lines not on this page · raw message

#20 lore raw

On 3/11/07, Sam Ravnborg <[email protected]> wrote:
[..snip..]

| > To make the conversion we should consider renaming from
| > current "Load alternate" to "Open config file..."
| > and likewise "Save alternate" to "Save config file as..."
| >
| > Comments?
| >
| >        Sam

[..snip...]

I think that is excellent. (Actually I can't test it now but the idea is just perfect)

#21 lore raw
In reply to Sam Ravnborg

[Sam Ravnborg - Sun, Mar 11, 2007 at 08:50:33PM +0100]

[... snipped ...]

| I would rather avoid adding the extra lines. In the
| 'office-suite' fashion I have cooked up a patch that specify
| the filename as part of the windows title.
| 
| To make the conversion we should consider renaming from
| current "Load alternate" to "Open config file..."
| and likewise "Save alternate" to "Save config file as..."
| 
| Comments?
| 
| 	Sam
|

[... snipped ...]

Hi Sam,

I've tested it and I think all do its work as it should... But only two points may be additionally changed:

1) I think it is better to show main dialog title in form:
"Linux Kernel v.2.6.21-rc3 Configuration - config file: .config"
2) You've set menu_backtitle with 128 characters may be we should set as PATH_MAX+1+128 - to hold a whole config file?

And renaming "Load alternate" to "Open config file..." and "Save alternate" to "Save config file as..." is fine I guess.

Hey kernel list - what's your comments? :)

Cyrill

#22 lore raw
In reply to Sam Ravnborg

[Sam Ravnborg - Sun, Mar 11, 2007 at 08:50:33PM +0100]

| On Sun, Mar 11, 2007 at 01:07:23PM +0300, Cyrill Gorcunov wrote:
| > [Sam Ravnborg - Sat, Mar 10, 2007 at 11:45:34PM +0100]
| > | On Sat, Mar 10, 2007 at 10:34:41PM +0100, Jan Engelhardt wrote:
| > | > 
| > | > On Mar 10 2007 22:27, Sam Ravnborg wrote:
| > | > >On Sat, Mar 10, 2007 at 07:23:41PM +0100, Jan Engelhardt wrote:
| > | > >> 
| > | > >> Whether the 'working config file path' should change when you do
| > | > >> 'Save as Alternate' or not, is a menuconfig axiom. Ask Sam Ravnborg
| > | > >> if you want it changed :-)
| > | > >
| > | > >Current behaviour is not logical but on the other hand I do not
| > | > >see a big need to make it so.
| > | > >It seems that people very seldom uses "save alternate" anyway.
| > | > >
| > | > >But patches are welcome.
| > | > 
| > | > ^_^ The patch has already been posted, has not it?
| > | No.
| > | Either we keep current behaviour or we change to the "normal"
| > | behaviour with a "Save as..." as know from all other programs.
| > | 
| > | 	Sam
| > | 
| > 
| > Hi Sam,
| > 
| > here is a patch for menuconfig that shows current configuration
| > file. So I think menuconfig does its work well but the only
| > thing we need is to show location of an _active_ configuration.
| > 
| > Any comments are welcome (and you may swear at me too :)
| I would rather avoid adding the extra lines. In the
| 'office-suite' fashion I have cooked up a patch that specify
| the filename as part of the windows title.
| 
| To make the conversion we should consider renaming from
| current "Load alternate" to "Open config file..."
| and likewise "Save alternate" to "Save config file as..."
| 
| Comments?
| 
| 	Sam

[... snip ...]

Hi Sam,

maybe my prev letter was lost, so let me repeat - I think your patch is pretty good to be merged into kernel. Did you send any patch to Andrew? Btw I think we may leave "Load Alternate..." and "Save Alternate..." as is - the user always may know what the config he is using on the main dialog title :)

Cyrill

#23 lore raw
In reply to Sam Ravnborg

Hi,

scripts/kconfig/mconf.c static struct gstr get_relations_str(struct symbol **sym_arr) · line 407

Quoted 5 lines · Sam Ravnborg
scripts/kconfig/mconf.c +5 -0
+	sym = sym_lookup("KERNELVERSION", 0);
+	sym_calc_value(sym);
+	size = snprintf(menu_backtitle, sizeof(menu_backtitle),
+	                _("%s - Linux Kernel v%s Configuration"),
+		        config_filename, sym_get_string_value(sym));

An alternative might to only show the filename, only if explicitly set.

scripts/kconfig/mconf.c int main(int ac, char **av) · line 908

Quoted 1 line
scripts/kconfig/mconf.c +1 -0
+	set_config_filename(".config");

Please don't hardcode the filename, use conf_get_configname() instead.

bye, Roman