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

Re: Premature aborts in apt again.



Hi,

	Yes, unconfigured is not hosed, but the system is indeed
 down. I was just thinking about how we go out of our way to unpack in
 an order to minimize the lenght of time packages are broken; this
 certainly falls in there.

	I think I would like to import a concept from mylti-threaded
 or distributed computing in here.

	Looking as a whole, a progeam is an entity that causes a
 system to change state, perhaps passing though untenable states in
 the middle.

	The whole idea of error handling is to ensure that the system
 is left in an acceptable state.

	For a package management system, we can break up the state of
 the system to be the state of the packages on the sytem, plus the
 state of the package management system internals.

	When we unpack a package, we should note that that package is
 not in an ideal state anymore; and install (conceptually at least) an
 exception handler which either reverts the package to the old,
 acceptable state, or moves it to another acceptable state (configures
 the package, in this case).

	Any error should poop up the stack of actions to be taken to
 move the package to an acceptable state, and fix up the internal
 representation (just aborting is not good enough).

	Similar considerations apply to any gobal resources held at
 the time of the exception/error, and bubbling up the exception should
 take recovery actions.

	I suggest looking at each package as we unpack; the action for
 recovery maybe to "unpack+configure pkg x" if the unpack order is
 different from configuration order, and some dependencies have not
 been unpacked yet, or just "configure package" if the dependencies
 have been met.

	Error recovery was one of the reasons I was unhappy with a
 different unpack order than configure order, enev if it means that
 packages are unusable for shorter intervals during an upgrade.

	manoj
-- 
 If on an actuarial basis there is a 50/50 chance that something will
 go wrong, it actually will go wrong nine times in ten.
Manoj Srivastava  <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E


--
To UNSUBSCRIBE, email to deity-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: