This seems to work. I left last_successful_item in, since it's still needed to allow skipping past menu items, and I understand how the seen_items hash is supposed to be used now.
Index: debian/changelog =================================================================== --- debian/changelog (revision 49361) +++ debian/changelog (working copy) @@ -7,8 +7,13 @@ * Fix a memory leak in show_main_menu(). (Closes: #438121) Thanks to Masami Ichikawa for the patch! - -- Jérémy Bobbio <[EMAIL PROTECTED]> Mon, 27 Aug 2007 19:04:39 +0200 + [ Joey Hess ] + * Fix test for new menu items that come before the last successful item. + It's ok to jump up the menu to run such new items. Closes: #444462 + * Fix NEVERDEFAULT test. Closes: #277743 + -- Joey Hess <[EMAIL PROTECTED]> Fri, 28 Sep 2007 18:47:20 -0400 + main-menu (1.20) unstable; urgency=low * Remove rather redundant extended description of main menu question. Index: main-menu.c =================================================================== --- main-menu.c (revision 49361) +++ main-menu.c (working copy) @@ -139,12 +139,15 @@ //di_log(DI_LOG_LEVEL_DEBUG, "not menu item; or not installed"); continue; } - if ((p->installer_menu_item < last_successful_item && - !di_hash_table_lookup(seen_items, &p->p.key)) && - p->installer_menu_item < NEVERDEFAULT) { + if (p->installer_menu_item >= NEVERDEFAULT) { //di_log(DI_LOG_LEVEL_DEBUG, "not in range to be default"); continue; } + if (p->installer_menu_item < last_successful_item && + di_hash_table_lookup(seen_items, &p->p.key)) { + //di_log(DI_LOG_LEVEL_DEBUG, "menu item is before last_successful_item, and is not new"); + continue; + } /* If menutest says this item should be default, make it so */ if (!isdefault(p)) { //di_log(DI_LOG_LEVEL_DEBUG, "isdefalt says no"); -- see shy jo
signature.asc
Description: Digital signature