Index: choose.cc =================================================================== RCS file: /cvs/src/src/winsup/cinstall/choose.cc,v retrieving revision 2.36 diff -u -p -r2.36 choose.cc --- choose.cc 2001/06/30 01:37:55 2.36 +++ choose.cc 2001/06/30 02:19:23 @@ -100,9 +100,11 @@ isinstalled (Package *pkg, int trust) 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)++) @@ -145,21 +147,28 @@ set_action (Package *pkg, bool preinc) 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); }