commit: f2afd7ff03e6e8453e86be938bd21c2cd33d3996 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Tue Mar 4 01:56:56 2014 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Thu Feb 26 23:04:28 2015 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f2afd7ff
Fix purgeonly to remove the chroot directory. catalyst/base/stagebase.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index f2aadee..191baab 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -504,6 +504,9 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_action_sequence(self): """ Default action sequence for run method """ + if "purgeonly" in self.settings["options"]: + self.settings["action_sequence"] = ["remove_chroot"] + return self.settings["action_sequence"]=["unpack","unpack_snapshot",\ "setup_confdir","portage_overlay",\ "base_dirs","bind","chroot_setup","setup_environment",\ @@ -517,6 +520,7 @@ class StageBase(TargetBase, ClearBase, GenBase): else: self.settings["action_sequence"].append("remove_autoresume") self.settings["action_sequence"].append("remove_chroot") + return def set_use(self): if self.settings["spec_prefix"]+"/use" in self.settings: @@ -1321,11 +1325,12 @@ class StageBase(TargetBase, ClearBase, GenBase): self.purge() return - if "PURGEONLY" in self.settings: + if "purgeonly" in self.settings["options"]: + print "StageBase: run() purgeonly" self.purge() - return if "purge" in self.settings["options"]: + print "StageBase: run() purge" self.purge() for x in self.settings["action_sequence"]: