From 7a2a7c4afd8ed965942e07b20b9030cd86f6f2c0 Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Tue, 13 Jan 2009 07:37:00 -0600 Subject: [PATCH] Reorganize init for snapshot target --- ChangeLog | 4 ++++ modules/catalyst/target/snapshot.py | 14 +++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74fdc51b..e5deb790 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ # Copyright 2002-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS) # Distributed under the GPL v2 + 13 Jan 2009; Andrew Gaffney + modules/catalyst/target/snapshot.py: + Reorganize init for snapshot target + 13 Jan 2009; Andrew Gaffney modules/catalyst/util.py: Try to import portage.util before portage_util diff --git a/modules/catalyst/target/snapshot.py b/modules/catalyst/target/snapshot.py index 50bf6500..7d5cbc0d 100644 --- a/modules/catalyst/target/snapshot.py +++ b/modules/catalyst/target/snapshot.py @@ -4,25 +4,25 @@ Builder class for snapshots. """ import os -from generic_stage import * import catalyst from catalyst.spawn import cmd from catalyst.output import * -class snapshot_target(generic_target): +class snapshot_target(catalyst.target.generic.generic_target): + def __init__(self,myspec,addlargs): - self.required_values=["version_stamp","target"] - self.valid_values=["version_stamp","target"] + self.required_values = ["version_stamp","target"] + self.valid_values = ["version_stamp","target"] + + catalyst.target.generic.generic_target.__init__(self) - generic_target.__init__(self) -# self.settings=myspec + def setup(self): self.settings["target_subpath"]="portage" st=self.settings["storedir"] self.settings["snapshot_path"]=catalyst.util.normpath(st+"/snapshots/portage-"+self.settings["version_stamp"]\ +".tar.bz2") self.settings["tmp_path"]=catalyst.util.normpath(st+"/tmp/"+self.settings["target_subpath"]) - def setup(self): x=catalyst.util.normpath(self.settings["storedir"]+"/snapshots") if not os.path.exists(x): os.makedirs(x) -- 2.26.2