Reorganize init for snapshot target
authorAndrew Gaffney <agaffney@gentoo.org>
Tue, 13 Jan 2009 13:37:00 +0000 (07:37 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Tue, 13 Jan 2009 13:37:00 +0000 (07:37 -0600)
ChangeLog
modules/catalyst/target/snapshot.py

index 74fdc51bc13d95c3d0f45b19836fd0893966a426..e5deb7909814e2f2dd3fc2a94f5c7b1484ac2d05 100644 (file)
--- 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 <agaffney@gentoo.org>
+  modules/catalyst/target/snapshot.py:
+  Reorganize init for snapshot target
+
   13 Jan 2009; Andrew Gaffney <agaffney@gentoo.org>
   modules/catalyst/util.py:
   Try to import portage.util before portage_util
index 50bf65008bdcaa69678b9e709aee7e6af2ff63fe..7d5cbc0d27929fdde8cd36e43d4ef4a571f60d1b 100644 (file)
@@ -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)