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

Bug#210920: [main-menu, bug #210920] Fix for the fix



It turns out the previous patch misinterpreted exit codes from menutest
scripts -- an exit value of 1 (true) means "don't care", not "don't
select". (languagechooser, for one, is affected by this.) This patch
(which should be applied on the top of the last one) should make things
work again. Apologies for the inconvenience. :-)

/* Steinar */

Index: main-menu.c
===================================================================
RCS file: /cvs/debian-boot/debian-installer/main-menu/main-menu.c,v
retrieving revision 1.83
diff -u -r1.83 main-menu.c
--- main-menu.c	15 Sep 2003 19:27:03 -0000	1.83
+++ main-menu.c	15 Sep 2003 22:18:13 -0000
@@ -51,24 +51,15 @@
 		      (*(struct package_t **)a)->package);
 }
 
-/*
- * Returns 1 if the given package _should_ be the default menu item (the
- * menutest script said so), 2 if the given package _could_ be the default
- * menu item (it is unpacked or half-configured). */
 int isdefault(struct package_t *p) {
 	int check;
 
 	check = check_script(p, "menutest");
-	if (check == -1) {
-		if (p->status == unpacked || p->status == half_configured) {
-			return 2;
-		}
-		else {
-			return 0;
-		}
+	if (check == 1 || p->status == unpacked || p->status == half_configured) {
+		return 1;
 	}
 	else {
-		return check;
+		return 0;
 	}
 }
 
@@ -115,11 +106,8 @@
 		if (!p->installer_menu_item || p->status == installed || !check_script(p, "isinstallable"))
 			continue;
 		/* If menutest says this item should be default, make it so */
-		def = isdefault(p);
-		if (def == 0)
+		if (!isdefault(p))
 			continue;
-		if (def == 1)
-			return p;
 		cont = 0;
                 /* Check if a "parallel" package is installed
 		 * (netcfg-{static,dhcp} and {lilo,grub}-installer are

Reply to: