Correctly remove previous phases.

Fixes: bug #1189716

Change-Id: I747e7bbcb2dfccf67b32cc04ea68c153e38ea534
This commit is contained in:
Joshua Harlow 2013-06-10 21:01:14 -07:00
parent ae59c07912
commit 8cb1b68337
3 changed files with 9 additions and 5 deletions

View File

@ -60,7 +60,7 @@ class InstallAction(action.Action):
logger=LOG) logger=LOG)
def _run(self, persona, component_order, instances): def _run(self, persona, component_order, instances):
removals = ['uninstall', 'unconfigure'] removals = ['unconfigure']
self._run_phase( self._run_phase(
action.PhaseFunctors( action.PhaseFunctors(
start=lambda i: LOG.info('Configuring %s.', colorizer.quote(i.name)), start=lambda i: LOG.info('Configuring %s.', colorizer.quote(i.name)),
@ -104,6 +104,7 @@ class InstallAction(action.Action):
LOG.info("Finished install of %s with result %s.", LOG.info("Finished install of %s with result %s.",
colorizer.quote(instance.name), result) colorizer.quote(instance.name), result)
removals += ["package-uninstall", 'uninstall']
dependency_handler = self.distro.dependency_handler_class( dependency_handler = self.distro.dependency_handler_class(
self.distro, self.root_dir, instances.values()) self.distro, self.root_dir, instances.values())
general_package = "general" general_package = "general"

View File

@ -33,7 +33,7 @@ class RemoveAction(action.Action):
return components return components
def _run(self, persona, component_order, instances): def _run(self, persona, component_order, instances):
removals = ['install'] removals = ['package-install', 'install']
general_package = "general" general_package = "general"
dependency_handler = self.distro.dependency_handler_class( dependency_handler = self.distro.dependency_handler_class(
self.distro, self.root_dir, instances.values()) self.distro, self.root_dir, instances.values())
@ -45,10 +45,11 @@ class RemoveAction(action.Action):
), ),
[general_package], [general_package],
{general_package: instances[general_package]}, {general_package: instances[general_package]},
"uninstall", "package-uninstall",
*removals *removals
) )
removals += ['prepare', 'download', "download-patch"]
self._run_phase( self._run_phase(
action.PhaseFunctors( action.PhaseFunctors(
start=lambda i: LOG.info('Uninstalling %s.', colorizer.quote(i.name)), start=lambda i: LOG.info('Uninstalling %s.', colorizer.quote(i.name)),
@ -61,7 +62,7 @@ class RemoveAction(action.Action):
*removals *removals
) )
removals += ['pre-install'] removals += ['pre-install', 'post-install']
self._run_phase( self._run_phase(
action.PhaseFunctors( action.PhaseFunctors(
start=lambda i: LOG.info('Post-uninstalling %s.', colorizer.quote(i.name)), start=lambda i: LOG.info('Post-uninstalling %s.', colorizer.quote(i.name)),

View File

@ -45,6 +45,7 @@ class UninstallAction(action.Action):
'unconfigure', 'unconfigure',
*removals *removals
) )
removals += ['post-install'] removals += ['post-install']
self._run_phase( self._run_phase(
action.PhaseFunctors( action.PhaseFunctors(
@ -58,6 +59,7 @@ class UninstallAction(action.Action):
*removals *removals
) )
removals += ['package-install']
general_package = "general" general_package = "general"
dependency_handler = self.distro.dependency_handler_class( dependency_handler = self.distro.dependency_handler_class(
self.distro, self.root_dir, instances.values()) self.distro, self.root_dir, instances.values())
@ -69,6 +71,6 @@ class UninstallAction(action.Action):
), ),
[general_package], [general_package],
{general_package: instances[general_package]}, {general_package: instances[general_package]},
"uninstall", "package-uninstall",
*removals *removals
) )