aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2015-05-24 00:36:49 -0700
committerBrian Dolbec <dolsen@gentoo.org>2015-09-06 14:18:00 -0700
commit9a280f3988a20e7d5e66dd42aaba4033be0ddba0 (patch)
tree4554d2df5fc157ab8d65efa0c664ae17b786ba8a /catalyst/targets
parenttestpath: Add pyDeComp path (diff)
downloadcatalyst-9a280f3988a20e7d5e66dd42aaba4033be0ddba0.tar.gz
catalyst-9a280f3988a20e7d5e66dd42aaba4033be0ddba0.tar.bz2
catalyst-9a280f3988a20e7d5e66dd42aaba4033be0ddba0.zip
Apply new compress code, normalize paths
Fix the target_filename ending in a slash
Diffstat (limited to 'catalyst/targets')
-rw-r--r--catalyst/targets/grp.py2
-rw-r--r--catalyst/targets/livecd_stage1.py2
-rw-r--r--catalyst/targets/livecd_stage2.py6
-rw-r--r--catalyst/targets/netboot.py8
-rw-r--r--catalyst/targets/netboot2.py2
-rw-r--r--catalyst/targets/stage2.py8
6 files changed, 14 insertions, 14 deletions
diff --git a/catalyst/targets/grp.py b/catalyst/targets/grp.py
index 14cffe0f..5a10fffa 100644
--- a/catalyst/targets/grp.py
+++ b/catalyst/targets/grp.py
@@ -42,7 +42,7 @@ class grp(StageBase):
StageBase.__init__(self,spec,addlargs)
def set_target_path(self):
- self.settings["target_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+"/")
+ self.settings["target_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"])
if "autoresume" in self.settings["options"] \
and self.resume.is_enabled("setup_target_path"):
print "Resume point detected, skipping target path setup operation..."
diff --git a/catalyst/targets/livecd_stage1.py b/catalyst/targets/livecd_stage1.py
index 8402e7aa..d5645e8c 100644
--- a/catalyst/targets/livecd_stage1.py
+++ b/catalyst/targets/livecd_stage1.py
@@ -33,7 +33,7 @@ class livecd_stage1(StageBase):
"unbind", "clean","clear_autoresume"]
def set_target_path(self):
- self.settings["target_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+'/')
+ self.settings["target_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"])
if "autoresume" in self.settings["options"] \
and self.resume.is_enabled("setup_target_path"):
print "Resume point detected, skipping target path setup operation..."
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index 9f0733ec..e5ca074f 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -37,13 +37,13 @@ class livecd_stage2(StageBase):
file_locate(self.settings, ["cdtar","controller_file"])
def set_source_path(self):
- self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2")
+ self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"])
if os.path.isfile(self.settings["source_path"]):
self.settings["source_path_hash"] = \
self.settings["hash_map"].generate_hash(
self.settings["source_path"])
else:
- self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+'/')
+ self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"])
if not os.path.exists(self.settings["source_path"]):
raise CatalystError("Source Path: " +
self.settings["source_path"] + " does not exist.",
@@ -53,7 +53,7 @@ class livecd_stage2(StageBase):
self.settings["spec_prefix"]="livecd"
def set_target_path(self):
- self.settings["target_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+"/")
+ self.settings["target_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"])
if "autoresume" in self.settings["options"] \
and self.resume.is_enabled("setup_target_path"):
print "Resume point detected, skipping target path setup operation..."
diff --git a/catalyst/targets/netboot.py b/catalyst/targets/netboot.py
index de8dc858..c41ed592 100644
--- a/catalyst/targets/netboot.py
+++ b/catalyst/targets/netboot.py
@@ -95,10 +95,10 @@ class netboot(StageBase):
for x in loopy:
if "netboot/packages/"+x+"/files" in self.settings:
- if type(self.settings["netboot/packages/"+x+"/files"]) == types.ListType:
- myfiles.extend(self.settings["netboot/packages/"+x+"/files"])
- else:
- myfiles.append(self.settings["netboot/packages/"+x+"/files"])
+ if type(self.settings["netboot/packages/"+x+"/files"]) == types.ListType:
+ myfiles.extend(self.settings["netboot/packages/"+x+"/files"])
+ else:
+ myfiles.append(self.settings["netboot/packages/"+x+"/files"])
if "netboot/extra_files" in self.settings:
if type(self.settings["netboot/extra_files"]) == types.ListType:
diff --git a/catalyst/targets/netboot2.py b/catalyst/targets/netboot2.py
index b492e6a5..3305a2a8 100644
--- a/catalyst/targets/netboot2.py
+++ b/catalyst/targets/netboot2.py
@@ -52,7 +52,7 @@ class netboot2(StageBase):
def set_target_path(self):
self.settings["target_path"]=normpath(self.settings["storedir"]+"/builds/"+\
- self.settings["target_subpath"]+"/")
+ self.settings["target_subpath"])
if "autoresume" in self.settings["options"] \
and self.resume.is_enabled("setup_target_path"):
print "Resume point detected, skipping target path setup operation..."
diff --git a/catalyst/targets/stage2.py b/catalyst/targets/stage2.py
index e54b5c9b..40dc9386 100644
--- a/catalyst/targets/stage2.py
+++ b/catalyst/targets/stage2.py
@@ -19,10 +19,10 @@ class stage2(StageBase):
StageBase.__init__(self,spec,addlargs)
def set_source_path(self):
- if "seedcache" in self.settings["options"] and os.path.isdir(normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root/")):
- self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root/")
+ if "seedcache" in self.settings["options"] and os.path.isdir(normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root")):
+ self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root")
else:
- self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2")
+ self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"])
if os.path.isfile(self.settings["source_path"]):
if os.path.exists(self.settings["source_path"]):
# XXX: Is this even necessary if the previous check passes?
@@ -34,7 +34,7 @@ class stage2(StageBase):
print "Source path set to "+self.settings["source_path"]
if os.path.isdir(self.settings["source_path"]):
print "\tIf this is not desired, remove this directory or turn of seedcache in the options of catalyst.conf"
- print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2\n")
+ print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"] + "\n")
# XXX: How do these override_foo() functions differ from the ones in
# StageBase and why aren't they in stage3_target?