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

Bug#232050: tag 232050 patch



severity 232050 grave
tag 232050 patch
thanks

prep-menu is run after pkgsel.  It resets base-installer/main-menu
to the first item.  This causes base-config to return to the time
zone question.  I commented out this set (after prep-menu is run
for the first time) and it stopped looping.

The attached, untested patch should fix the problem.

-- 
Matt Kraai            kraai@ftbfs.org            http://ftbfs.org/
diff -ru base-config-2.11-old/base-config base-config-2.11/base-config
--- base-config-2.11-old/base-config	2004-02-11 09:46:15.000000000 -0800
+++ base-config-2.11/base-config	2004-02-11 09:47:22.000000000 -0800
@@ -99,7 +99,7 @@
 export TMPDIR
 
 # Set up to display the menu.
-./prep-menu
+./prep-menu 1
 
 # Display the main menu. The show-menu helper program returns when the menu
 # is done, or when the selected menu item needs to run outside debconf.
@@ -127,7 +127,7 @@
 	fi
 	
 	if grep -q '^Changes-Menu: true' menu/$menu_item.mnu; then
-		./prep-menu
+		./prep-menu 0
 	fi
 done
 
diff -ru base-config-2.11-old/lib/prep-menu base-config-2.11/lib/prep-menu
--- base-config-2.11-old/lib/prep-menu	2004-02-11 09:46:15.000000000 -0800
+++ base-config-2.11/lib/prep-menu	2004-02-11 09:49:24.000000000 -0800
@@ -6,6 +6,8 @@
 
 . /usr/share/debconf/confmodule
 
+SET_DEFAULT=$1
+
 # Get an ordered list of the menu items.
 get_menu_items () {
 	(
@@ -26,8 +28,11 @@
 		echo "$RET:$item" >> menu-mapping
 		if [ -z "$CHOICES" ]; then
 			CHOICES="$RET"
-			# Mark first menu item as default to get things going.
-			db_set base-config/main-menu "$RET"
+			if [ "$SET_DEFAULT" -eq 1 ]; then
+			    # Mark first menu item as default to get things
+			    # going.
+			    db_set base-config/main-menu "$RET"
+			fi
 		else
 			CHOICES="$CHOICES, $RET"
 		fi
diff -ru base-config-2.11-old/lib/show-menu base-config-2.11/lib/show-menu
--- base-config-2.11-old/lib/show-menu	2004-02-11 09:46:15.000000000 -0800
+++ base-config-2.11/lib/show-menu	2004-02-11 09:47:37.000000000 -0800
@@ -64,6 +64,6 @@
 	fi
 
 	if grep -q '^Changes-Menu: true' menu/$menu_item.mnu; then
-		./prep-menu
+		./prep-menu 0
 	fi
 done

Reply to: