# Copyright 2002-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS)
# Distributed under the GPL v2
+ 12 Jan 2009; Andrew Gaffney <agaffney@gentoo.org>
+ modules/catalyst/target/generic.py,
+ modules/catalyst/target/generic_stage.py:
+ Move set_autoresume_path() from catalyst.target.generic_stage to
+ catalyst.target.generic
+
12 Jan 2009; Andrew Gaffney <agaffney@gentoo.org>
modules/catalyst/target/generic_stage.py, modules/catalyst/target/grp.py,
modules/catalyst/target/livecd_stage1.py,
"""
import catalyst
+from catalyst.output import *
class generic_target:
self.env={}
self.env["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
+ def set_autoresume_path(self):
+ self.settings["autoresume_path"] = catalyst.util.normpath(self.settings["storedir"] + \
+ "/tmp/" + self.settings["rel_type"] + "/" + ".autoresume-" + \
+ self.settings["target"] + "-" + self.settings["subarch"] + "-" + \
+ self.settings["version_stamp"] + "/")
+ if self.check_autoresume():
+ msg("The autoresume path is " + self.settings["autoresume_path"])
+ if not os.path.exists(self.settings["autoresume_path"]):
+ os.makedirs(self.settings["autoresume_path"],0755)
+
+
def check_autoresume(self, step=None):
if "AUTORESUME" in self.settings:
if step:
"/tmp/"+self.settings["target_subpath"]+"/")
self.chroot_lock=catalyst.lock.LockDir(self.settings["chroot_path"])
- def set_autoresume_path(self):
- self.settings["autoresume_path"]=catalyst.util.normpath(self.settings["storedir"]+\
- "/tmp/"+self.settings["rel_type"]+"/"+".autoresume-"+\
- self.settings["target"]+"-"+self.settings["subarch"]+"-"+\
- self.settings["version_stamp"]+"/")
- if self.check_autoresume():
- print "The autoresume path is " + self.settings["autoresume_path"]
- if not os.path.exists(self.settings["autoresume_path"]):
- os.makedirs(self.settings["autoresume_path"],0755)
-
def set_controller_file(self):
self.settings["controller_file"]=catalyst.util.normpath(self.settings["sharedir"]+\
"/targets/"+self.settings["target"]+"/"+self.settings["target"]+\