# cmd("rm -f "+self.settings["target_path"],\
# "Could not remove existing file: "\
# +self.settings["target_path"],env=self.env)
- touch(self.settings["autoresume_path"]+"setup_target_path")
+ catalyst.util.touch(self.settings["autoresume_path"]+"setup_target_path")
if not os.path.exists(self.settings["storedir"]+"/builds/"):
os.makedirs(self.settings["storedir"]+"/builds/")
myf.write(self.settings["source_path_hash"])
myf.close()
else:
- touch(self.settings["autoresume_path"]+"unpack")
+ catalyst.util.touch(self.settings["autoresume_path"]+"unpack")
else:
print "Resume point detected, skipping unpack operation..."
self.settings["target_profile"]+" "+\
self.settings["chroot_path"]+"/etc/make.profile",\
"Error creating profile link",env=self.env)
- touch(self.settings["autoresume_path"]+"config_profile_link")
+ catalyst.util.touch(self.settings["autoresume_path"]+"config_profile_link")
def setup_confdir(self):
if "AUTORESUME" in self.settings \
cmd("cp -R "+self.settings["portage_confdir"]+"/ "+\
self.settings["chroot_path"]+"/etc/portage",\
"Error copying /etc/portage",env=self.env)
- touch(self.settings["autoresume_path"]+"setup_confdir")
+ catalyst.util.touch(self.settings["autoresume_path"]+"setup_confdir")
def portage_overlay(self):
""" We copy the contents of our overlays to /usr/local/portage """
cmd("cp "+self.settings["chroot_path"]+"/etc/make.conf "+\
self.settings["chroot_path"]+"/etc/make.conf.catalyst",\
"Could not backup /etc/make.conf",env=self.env)
- touch(self.settings["autoresume_path"]+"chroot_setup")
+ catalyst.util.touch(self.settings["autoresume_path"]+"chroot_setup")
def fsscript(self):
if "AUTORESUME" in self.settings \
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+\
" fsscript","fsscript script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"fsscript")
+ catalyst.util.touch(self.settings["autoresume_path"]+"fsscript")
def rcupdate(self):
if "AUTORESUME" in self.settings \
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+" rc-update",\
"rc-update script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"rcupdate")
+ catalyst.util.touch(self.settings["autoresume_path"]+"rcupdate")
def clean(self):
if "AUTORESUME" in self.settings \
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+" clean",\
"clean script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"clean")
+ catalyst.util.touch(self.settings["autoresume_path"]+"clean")
def empty(self):
if "AUTORESUME" in self.settings \
os.makedirs(myemp,0755)
os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
os.chmod(myemp,mystat[ST_MODE])
- touch(self.settings["autoresume_path"]+"empty")
+ catalyst.util.touch(self.settings["autoresume_path"]+"empty")
def remove(self):
if "AUTORESUME" in self.settings \
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+\
" clean","Clean failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"remove")
+ catalyst.util.touch(self.settings["autoresume_path"]+"remove")
except:
self.unbind()
raise
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+\
" preclean","preclean script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"preclean")
+ catalyst.util.touch(self.settings["autoresume_path"]+"preclean")
except:
self.unbind()
self.gen_contents_file(self.settings["target_path"])
self.gen_digest_file(self.settings["target_path"])
- touch(self.settings["autoresume_path"]+"capture")
+ catalyst.util.touch(self.settings["autoresume_path"]+"capture")
def run_local(self):
if "AUTORESUME" in self.settings \
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+" run",\
"run script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"run_local")
+ catalyst.util.touch(self.settings["autoresume_path"]+"run_local")
except CatalystError:
self.unbind()
except CatalystError:
self.unbind()
raise
- touch(self.settings["autoresume_path"]+"unmerge")
+ catalyst.util.touch(self.settings["autoresume_path"]+"unmerge")
def target_setup(self):
if "AUTORESUME" in self.settings \
cmd("/bin/bash "+self.settings["controller_file"]+\
" target_image_setup "+ self.settings["target_path"],\
"target_image_setup script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"target_setup")
+ catalyst.util.touch(self.settings["autoresume_path"]+"target_setup")
def setup_overlay(self):
if "AUTORESUME" in self.settings \
self.settings["target_path"],\
self.settings["spec_prefix"]+"overlay: "+x+\
" copy failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"setup_overlay")
+ catalyst.util.touch(self.settings["autoresume_path"]+"setup_overlay")
def create_iso(self):
if "AUTORESUME" in self.settings \
env=self.env)
self.gen_contents_file(self.settings["iso"])
self.gen_digest_file(self.settings["iso"])
- touch(self.settings["autoresume_path"]+"create_iso")
+ catalyst.util.touch(self.settings["autoresume_path"]+"create_iso")
else:
print "WARNING: livecd/iso was not defined."
print "An ISO Image will not be created."
cmd("/bin/bash "+self.settings["controller_file"]+\
" build_packages "+mypack,\
"Error in attempt to build packages",env=self.env)
- touch(self.settings["autoresume_path"]+"build_packages")
+ catalyst.util.touch(self.settings["autoresume_path"]+"build_packages")
except CatalystError:
self.unbind()
raise CatalystError,self.settings["spec_prefix"]+\
cmd("rm -R "+self.settings["chroot_path"]+\
"/tmp/initramfs_overlay/",env=self.env)
- touch(self.settings["autoresume_path"]+\
+ catalyst.util.touch(self.settings["autoresume_path"]+\
"build_kernel_"+kname)
"""
" post-kmerge ",
"Runscript post-kmerge failed",env=self.env)
- touch(self.settings["autoresume_path"]+"build_kernel")
+ catalyst.util.touch(self.settings["autoresume_path"]+"build_kernel")
except CatalystError:
self.unbind()
cmd("/bin/bash "+self.settings["controller_file"]+\
" bootloader " + self.settings["target_path"],\
"Bootloader script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"bootloader")
+ catalyst.util.touch(self.settings["autoresume_path"]+"bootloader")
except CatalystError:
self.unbind()
raise CatalystError,"Script aborting due to error."
try:
cmd("/bin/bash "+self.settings["controller_file"]+\
" livecd-update","livecd-update failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"livecd_update")
+ catalyst.util.touch(self.settings["autoresume_path"]+"livecd_update")
except CatalystError:
self.unbind()
if os.path.isfile(self.settings["target_path"]):
cmd("rm -f "+self.settings["target_path"], \
"Could not remove existing file: "+self.settings["target_path"],env=self.env)
- touch(self.settings["autoresume_path"]+"setup_target_path")
+ catalyst.util.touch(self.settings["autoresume_path"]+"setup_target_path")
if not os.path.exists(self.settings["storedir"]+"/builds/"):
os.makedirs(self.settings["storedir"]+"/builds/")
self.unbind()
raise CatalystError,"Failed to copy files to image!"
- touch(self.settings["autoresume_path"]+"copy_files_to_image")
+ catalyst.util.touch(self.settings["autoresume_path"]+"copy_files_to_image")
def setup_overlay(self):
if "AUTORESUME" in self.settings \
if os.path.exists(x):
cmd("rsync -a "+x+"/ "+\
self.settings["chroot_path"] + self.settings["merge_path"], "netboot2/overlay: "+x+" copy failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"setup_overlay")
+ catalyst.util.touch(self.settings["autoresume_path"]+"setup_overlay")
def move_kernels(self):
# we're done, move the kernels to builds/*
os.makedirs(myemp,0755)
os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
os.chmod(myemp,mystat[ST_MODE])
- touch(self.settings["autoresume_path"]+"empty")
+ catalyst.util.touch(self.settings["autoresume_path"]+"empty")
def set_action_sequence(self):
self.settings["action_sequence"]=["unpack","unpack_snapshot","config_profile_link",