[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#616315: cdebconf in d-i via serial hides the option to go back



Hi,

A Quinta 03 Março 2011 12:40:12 Ian Jackson você escreveu:
> Package: cdebconf-text-udeb
> Version: 0.154
> 
> When running the squeeze installer via a serial console there should
> be something in the prompt to tell you that you can go back; you
> shouldn't have to read the help to know this.
> 
> The help is very long and "go back" is an important option.
> 
> Also I'm not convinced that having the "go back" option presented in
> the help text only when it's available is a good idea.  I got the help
> text from one prompt, which happened to be one which didn't have a "go
> back" option, and that gave me the idea that it just wasn't possible.
> 
> In case it's of any use, attached is a transcript of me struggling
> with it, before I got helpful advice on IRC to try "<".
> 
> Thanks,
> Ian.

In attachment a patch for cdebconf to be reviewed.

-- 
Melhores cumprimentos/Best regards,

Miguel Figueiredo
http://www.DebianPT.org
diff --git a/debian/cdebconf-text-udeb.templates b/debian/cdebconf-text-udeb.templates
index 3a960a7..8fe79dd 100644
--- a/debian/cdebconf-text-udeb.templates
+++ b/debian/cdebconf-text-udeb.templates
@@ -36,17 +36,17 @@ _Description: No
 Template: debconf/text-prompt-default
 Type: text
 # :sl4:
-_Description: Prompt: '%c' for help, default=%d> 
+_Description: Prompt: '%c' for help, '%c' go back, default=%d> 
 
 Template: debconf/text-prompt
 Type: text
 # :sl4:
-_Description: Prompt: '%c' for help> 
+_Description: Prompt: '%c' for help, '%c' go back> 
 
 Template: debconf/text-prompt-default-string
 Type: text
 # :sl4:
-_Description: Prompt: '%c' for help, default=%s> 
+_Description: Prompt: '%c' for help, '%c' go back, default=%s> 
 
 Template: debconf/cont-prompt
 Type: text
diff --git a/debian/changelog b/debian/changelog
index 6f33413..f21a0e0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,9 @@
 cdebconf (0.155) UNRELEASED; urgency=low
 
+  [ Miguel Figueiredo]
+  * Add go back to prompt on text install. Closes: #616315.
+  
+  [ Colin Watson ]
   * Appease compiler warnings in align_text_renderer_render.  (In practice
     x_offset and y_offset are never uninitialised here, but knowing that
     requires knowing that cell_area can never be NULL.)
diff --git a/src/modules/frontend/text/text.c b/src/modules/frontend/text/text.c
index db4988d..92141a7 100644
--- a/src/modules/frontend/text/text.c
+++ b/src/modules/frontend/text/text.c
@@ -344,10 +344,10 @@ static int text_handler_boolean(struct frontend *obj, struct question *q)
 		printf("\n");
 		if (def)
 			printf(question_get_text(obj, "debconf/text-prompt-default",
-					"Prompt: '%c' for help, default=%d> "), CHAR_HELP, def);
+					"Prompt: '%c' for help, '%c' go back, default=%d> "), CHAR_HELP, CHAR_GOBACK, def);
 		else
 			printf(question_get_text(obj, "debconf/text-prompt",
-					"Prompt: '%c' for help> "), CHAR_HELP);
+					"Prompt: '%c' for help, '%c' go back> "), CHAR_HELP, CHAR_GOBACK);
 		get_answer(buf, sizeof(buf));
 		if (buf[0] == CHAR_HELP && buf[1] == 0)
 			show_help(obj, q);
@@ -431,7 +431,7 @@ static int text_handler_multiselect(struct frontend *obj, struct question *q)
   DISPLAY:
 	printlist (obj, q, count, choices_translated, tindex, selected);
 	printf(question_get_text(obj, "debconf/text-prompt-default-string", 
-		"Prompt: '%c' for help, default=%s> "), CHAR_HELP, defval);
+		"Prompt: '%c' for help, '%c' go back, default=%s> "), CHAR_HELP, CHAR_GOBACK, defval);
 	get_answer(answer, sizeof(answer));
 	if (answer[0] == CHAR_HELP && answer[1] == 0)
 	{
@@ -551,11 +551,11 @@ static int text_handler_select(struct frontend *obj, struct question *q)
 		printlist (obj, q, count, choices_translated, tindex, selected);
 		if (def >= 0 && choices_translated[def]) {
 			printf(question_get_text(obj, "debconf/text-prompt-default", 
-				"Prompt: '%c' for help, default=%d> "),
-					CHAR_HELP, def+1);
+				"Prompt: '%c' for help, '%c' go back, default=%d> "),
+					CHAR_HELP, CHAR_GOBACK, def+1);
 		} else {
 			printf(question_get_text(obj, "debconf/text-prompt",
-				"Prompt: '%c' for help> "), CHAR_HELP);
+				"Prompt: '%c' for help, '%c' go back> "), CHAR_HELP, CHAR_GOBACK);
 		}
 		get_answer(answer, sizeof(answer));
 		if (answer[0] == CHAR_HELP)
@@ -687,9 +687,9 @@ static int text_handler_string(struct frontend *obj, struct question *q)
 	const char *defval = question_getvalue(q, "");
 	while (1) {
 		if (defval)
-			printf(question_get_text(obj, "debconf/text-prompt-default-string", "Prompt: '%c' for help, default=%s> "), CHAR_HELP, defval);
+			printf(question_get_text(obj, "debconf/text-prompt-default-string", "Prompt: '%c' for help, '%c' go back, default=%s> "), CHAR_HELP, CHAR_GOBACK, defval);
 		else
-			printf(question_get_text(obj, "debconf/text-prompt", "Prompt: '%c' for help> "), CHAR_HELP);
+			printf(question_get_text(obj, "debconf/text-prompt", "Prompt: '%c' for help, '%c' go back> "), CHAR_HELP, CHAR_GOBACK);
 		fflush(stdout);
 		get_answer(buf, sizeof(buf));
 		if (buf[0] == CHAR_HELP && buf[1] == 0)

Reply to: