+Mon Jun 25 00:56:37 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * choose.cc (set_action): Only clear srcpicked when moving to next state.
+ Allow source installation if it exists in the current "trust" state.
+ Don't move to skip state when package is installed.
+ (list_click): Don't allow source clicking when no source is available.
+ (set_full_list): Display package when not is_full_action.
+ * ini.h (is_full_action): Define.
+
Sun Jun 17 12:06:14 2001 Christopher Faylor <cgf@cygnus.com>
* install.cc (check_for_old_cygwin): New function. First stab at
static void
set_action (Package *pkg, bool preinc)
{
- pkg->srcpicked = 0;
if (!pkg->action || preinc)
- ((int) pkg->action)++;
+ {
+ ((int) pkg->action)++;
+ pkg->srcpicked = 0;
+ }
/* Exercise the action state machine. */
for (;; ((int) pkg->action)++)
case ACTION_UNINSTALL:
if (pkg->installed)
return;
+ break;
case ACTION_REDO:
- if (pkg->installed)
+ if (pkg->installed && pkg->info[pkg->installed_ix].install_exists)
{
pkg->trust = pkg->installed_ix;
return;
}
+ break;
case ACTION_SRC_ONLY:
- if (pkg->installed && pkg->installed->source_exists)
- return;
+ if (pkg->info[pkg->trust].source_exists)
+ {
+ pkg->srcpicked = 1;
+ return;
+ }
break;
case ACTION_SAME_LAST:
pkg->action = ACTION_SKIP;
/* Fall through intentionally */
case ACTION_SKIP:
- return;
+ if (!pkg->installed || !pkg->info[pkg->installed_ix].install_exists)
+ return;
+ break;
default:
log (0, "should never get here %d\n", pkg->action);
}
if (x >= headers[NEW_COL].x - (HMARGIN / 2) && x <= headers[NEW_COL + 1].x - HMARGIN/2)
set_action (pkg, 1);
- if (x >= headers[SRC_COL].x - HMARGIN/2 && x <= headers[SRC_COL + 1].x - HMARGIN/2)
+ if (pkg->info[pkg->trust].source_exists &&
+ x >= headers[SRC_COL].x - HMARGIN/2 && x <= headers[SRC_COL + 1].x - HMARGIN/2)
pkg->srcpicked ^= 1;
RECT rect;
if (!pkg->exclude)
{
set_action (pkg, 0);
- if ((isfull || is_download_action (pkg)))
+ if (isfull || !is_full_action (pkg))
package_indexes[nindexes++] = pkg - package;
}
(pkg->info[t].install_exists) ? "yes":"no",
pkg->info[t].source ?: "(none)",
pkg->info[t].source_size,
- (pkg->info[t].source_exists == 1) ? "yes":"no");
+ (pkg->info[t].source_exists == 1) ? "yes" : "no");
}
}
}
(pkg)->action == ACTION_PREV || \
(pkg)->action == ACTION_UNINSTALL)
+#define is_full_action(pkg) \
+ (((pkg)->action >= ACTION_SAME_PREV && (pkg)->action <= ACTION_SAME_TEST) \
+ || (pkg)->action == ACTION_SKIP)
+
#define SRCACTION_NO 0
#define SRCACTION_YES 1
typedef struct _Info