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

Bug#229648: reopened showold bug



I've reopened this bug because the hack of making main-menu set showold
when reconfiguring is not good enough. Sure, it works for reconfiguring.
But if a menu item fails, or backs up to the menu, the package is left
half-configured. In this case, when it's run again, main-menu does a
udpkg --configure, and does not set showold first. So whatever you did
wrong in answering that menu items's questions can't be undone, since it
doesn't redisplay the questions to you. Potentially kinda bad..

Short-term, I think it would be better to back out the patch that closed
this bug, the original behavior that prompted the bug is not as bad as
this.

Brain-storming other ways to fix it..

- Make cdebconf in d-i honor the seen flag if it's set -- but never set
  it even when displaying questions. This would let database preseeders
  do their thing, while letting us not worry about the status of the
  seen flag at all. There could be a special cdebconf/mark_seen that is
  forced to false in d-i.

- Make main-menu notice when a package is marked as half-configured, and
  assume that something went wrong, so set showold when configring it,
  same as it does now when reconfiguring. The patch is trivial:

--- main-menu.c	(revision 11760)
+++ main-menu.c	(working copy)
@@ -447,7 +447,8 @@
 
 	di_log(DI_LOG_LEVEL_DEBUG, "Menu item '%s' selected", p->p.package);
 
-	if (p->p.status == di_package_status_installed) {
+	if (p->p.status == di_package_status_installed ||
+	    p->p.status == di_package_status_half_configured) {
 		set_package_title(p);
 
 		/* The menu item is already configured, so reconfigure it. */
@@ -472,7 +473,7 @@
 			di_log(DI_LOG_LEVEL_WARNING, "Reconfiguring '%s' failed with error code %d", p->p.package, ret);
 		ret = !ret;
 	}
-	else if (p->p.status == di_package_status_unpacked || p->p.status == di_package_status_half_configured) {
+	else if (p->p.status == di_package_status_unpacked) {
 		ret = di_config_package(p, satisfy_virtual, check_special);
 	}
 
Either of these sounds fine to me. I kinda prefer the first since it has
the nice side-effect of letting one run programs at the shell in d-i
that use debconf, and not having to worry about the seen flag preventing
questions from being redisplayed there.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: