public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/, catalyst/targets/
@ 2013-06-18 20:44 Brian Dolbec
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Dolbec @ 2013-06-18 20:44 UTC (permalink / raw
  To: gentoo-commits

commit:     52c9d37ff5de18981d6ecbe5bdde524b2bf4ebda
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 12 14:40:12 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Jun 12 14:40:12 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=52c9d37f

Fix livecd source and target paths not ending with a slash

---
 catalyst/base/stagebase.py        | 2 +-
 catalyst/targets/livecd_stage1.py | 3 +--
 catalyst/targets/livecd_stage2.py | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 1db0f81..0105723 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -285,7 +285,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 	def set_target_subpath(self):
 		self.settings["target_subpath"]=self.settings["rel_type"]+"/"+\
 				self.settings["target"]+"-"+self.settings["subarch"]+"-"+\
-				self.settings["version_stamp"]
+				self.settings["version_stamp"] +'/'
 
 	def set_source_subpath(self):
 		if type(self.settings["source_subpath"])!=types.StringType:

diff --git a/catalyst/targets/livecd_stage1.py b/catalyst/targets/livecd_stage1.py
index 55859bc..8402e7a 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..."
@@ -43,7 +43,6 @@ class livecd_stage1(StageBase):
 				cmd("rm -rf "+self.settings["target_path"],\
 					"Could not remove existing directory: "+self.settings["target_path"],env=self.env)
 				self.resume.enable("setup_target_path")
-
 			ensure_dirs(self.settings["target_path"])
 
 	def set_spec_prefix(self):

diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index c22fa0f..8fc406b 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -44,7 +44,7 @@ class livecd_stage2(StageBase):
 				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.",


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/, catalyst/targets/
@ 2013-06-28  1:04 Brian Dolbec
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Dolbec @ 2013-06-28  1:04 UTC (permalink / raw
  To: gentoo-commits

commit:     4d17d02544ae2557fc1bb81665c759880534266d
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 27 23:41:39 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Jun 27 23:41:39 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=4d17d025

Strip trailing slash from subpath's if they exist when creating filenames.

This bug was introduced in commit 52c9d37ff5de18981d6ecbe5bdde524b2bf4ebda when a trailing slash was added to target_subpath.

---
 catalyst/base/stagebase.py        | 10 +++++-----
 catalyst/targets/livecd_stage2.py |  2 +-
 catalyst/targets/stage2.py        |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0105723..b0144f6 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -314,7 +314,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	def set_target_path(self):
 		self.settings["target_path"]=normpath(self.settings["storedir"]+\
-			"/builds/"+self.settings["target_subpath"]+".tar.bz2")
+			"/builds/"+self.settings["target_subpath"].rstrip('/')+".tar.bz2")
 		if "autoresume" in self.settings["options"]\
 			and self.resume.is_enabled("setup_target_path"):
 			print \
@@ -398,7 +398,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				"/tmp/"+self.settings["source_subpath"])
 		else:
 			self.settings["source_path"]=normpath(self.settings["storedir"]+\
-				"/builds/"+self.settings["source_subpath"]+".tar.bz2")
+				"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2")
 			if os.path.isfile(self.settings["source_path"]):
 				# XXX: Is this even necessary if the previous check passes?
 				if os.path.exists(self.settings["source_path"]):
@@ -413,7 +413,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			print "\tseedcache in the options of catalyst.conf the source path"
 			print "\twill then be "+\
 				normpath(self.settings["storedir"]+"/builds/"+\
-				self.settings["source_subpath"]+".tar.bz2\n")
+				self.settings["source_subpath"].rstrip('/')+".tar.bz2\n")
 
 	def set_dest_path(self):
 		if "root_path" in self.settings:
@@ -429,7 +429,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 	def set_snapshot_path(self):
 		self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
 			"/snapshots/" + self.settings["snapshot_name"] +
-			self.settings["snapshot"]+".tar.xz")
+			self.settings["snapshot"].rstrip('/')+".tar.xz")
 
 		if os.path.exists(self.settings["snapshot_path"]):
 			self.settings["snapshot_path_hash"]=\
@@ -440,7 +440,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
 				"/snapshots/" + self.settings["snapshot_name"] +
-				self.settings["snapshot"]+".tar.bz2")
+				self.settings["snapshot"].rstrip('/')+".tar.bz2")
 
 			if os.path.exists(self.settings["snapshot_path"]):
 				self.settings["snapshot_path_hash"]=\

diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index 8fc406b..4016f57 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -38,7 +38,7 @@ 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"]+".tar.bz2")
+		self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2")
 		if os.path.isfile(self.settings["source_path"]):
 			self.settings["source_path_hash"] = \
 				self.settings["hash_map"].generate_hash(

diff --git a/catalyst/targets/stage2.py b/catalyst/targets/stage2.py
index c447fac..116871c 100644
--- a/catalyst/targets/stage2.py
+++ b/catalyst/targets/stage2.py
@@ -23,7 +23,7 @@ class stage2(StageBase):
 		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"]+".tar.bz2")
+			self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2")
 			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?
@@ -35,7 +35,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"]+".tar.bz2\n")
+			print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2\n")
 
 	# XXX: How do these override_foo() functions differ from the ones in
 	# StageBase and why aren't they in stage3_target?


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/, catalyst/targets/
@ 2013-11-21  9:06 Brian Dolbec
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Dolbec @ 2013-11-21  9:06 UTC (permalink / raw
  To: gentoo-commits

commit:     de93c2c1467e8c970da375ee11a9a5b53771af7c
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 12 14:40:12 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Nov 21 09:00:11 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=de93c2c1

Fix livecd source and target paths not ending with a slash

---
 catalyst/base/stagebase.py        | 2 +-
 catalyst/targets/livecd_stage1.py | 3 +--
 catalyst/targets/livecd_stage2.py | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 1db0f81..0105723 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -285,7 +285,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 	def set_target_subpath(self):
 		self.settings["target_subpath"]=self.settings["rel_type"]+"/"+\
 				self.settings["target"]+"-"+self.settings["subarch"]+"-"+\
-				self.settings["version_stamp"]
+				self.settings["version_stamp"] +'/'
 
 	def set_source_subpath(self):
 		if type(self.settings["source_subpath"])!=types.StringType:

diff --git a/catalyst/targets/livecd_stage1.py b/catalyst/targets/livecd_stage1.py
index 55859bc..8402e7a 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..."
@@ -43,7 +43,6 @@ class livecd_stage1(StageBase):
 				cmd("rm -rf "+self.settings["target_path"],\
 					"Could not remove existing directory: "+self.settings["target_path"],env=self.env)
 				self.resume.enable("setup_target_path")
-
 			ensure_dirs(self.settings["target_path"])
 
 	def set_spec_prefix(self):

diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index c22fa0f..8fc406b 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -44,7 +44,7 @@ class livecd_stage2(StageBase):
 				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.",


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/, catalyst/targets/
@ 2013-11-21  9:06 Brian Dolbec
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Dolbec @ 2013-11-21  9:06 UTC (permalink / raw
  To: gentoo-commits

commit:     3460699c2306be5ecc3e40e73d3b4d5a1827cda8
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 27 23:41:39 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Nov 21 09:00:12 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=3460699c

Strip trailing slash from subpath's if they exist when creating filenames.

This bug was introduced in commit 52c9d37ff5de18981d6ecbe5bdde524b2bf4ebda when a trailing slash was added to target_subpath.

---
 catalyst/base/stagebase.py        | 10 +++++-----
 catalyst/targets/livecd_stage2.py |  2 +-
 catalyst/targets/stage2.py        |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0105723..b0144f6 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -314,7 +314,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	def set_target_path(self):
 		self.settings["target_path"]=normpath(self.settings["storedir"]+\
-			"/builds/"+self.settings["target_subpath"]+".tar.bz2")
+			"/builds/"+self.settings["target_subpath"].rstrip('/')+".tar.bz2")
 		if "autoresume" in self.settings["options"]\
 			and self.resume.is_enabled("setup_target_path"):
 			print \
@@ -398,7 +398,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				"/tmp/"+self.settings["source_subpath"])
 		else:
 			self.settings["source_path"]=normpath(self.settings["storedir"]+\
-				"/builds/"+self.settings["source_subpath"]+".tar.bz2")
+				"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2")
 			if os.path.isfile(self.settings["source_path"]):
 				# XXX: Is this even necessary if the previous check passes?
 				if os.path.exists(self.settings["source_path"]):
@@ -413,7 +413,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			print "\tseedcache in the options of catalyst.conf the source path"
 			print "\twill then be "+\
 				normpath(self.settings["storedir"]+"/builds/"+\
-				self.settings["source_subpath"]+".tar.bz2\n")
+				self.settings["source_subpath"].rstrip('/')+".tar.bz2\n")
 
 	def set_dest_path(self):
 		if "root_path" in self.settings:
@@ -429,7 +429,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 	def set_snapshot_path(self):
 		self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
 			"/snapshots/" + self.settings["snapshot_name"] +
-			self.settings["snapshot"]+".tar.xz")
+			self.settings["snapshot"].rstrip('/')+".tar.xz")
 
 		if os.path.exists(self.settings["snapshot_path"]):
 			self.settings["snapshot_path_hash"]=\
@@ -440,7 +440,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
 				"/snapshots/" + self.settings["snapshot_name"] +
-				self.settings["snapshot"]+".tar.bz2")
+				self.settings["snapshot"].rstrip('/')+".tar.bz2")
 
 			if os.path.exists(self.settings["snapshot_path"]):
 				self.settings["snapshot_path_hash"]=\

diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index 8fc406b..4016f57 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -38,7 +38,7 @@ 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"]+".tar.bz2")
+		self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2")
 		if os.path.isfile(self.settings["source_path"]):
 			self.settings["source_path_hash"] = \
 				self.settings["hash_map"].generate_hash(

diff --git a/catalyst/targets/stage2.py b/catalyst/targets/stage2.py
index c447fac..116871c 100644
--- a/catalyst/targets/stage2.py
+++ b/catalyst/targets/stage2.py
@@ -23,7 +23,7 @@ class stage2(StageBase):
 		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"]+".tar.bz2")
+			self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2")
 			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?
@@ -35,7 +35,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"]+".tar.bz2\n")
+			print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2\n")
 
 	# XXX: How do these override_foo() functions differ from the ones in
 	# StageBase and why aren't they in stage3_target?


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/, catalyst/targets/
@ 2014-01-22  5:04 Brian Dolbec
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Dolbec @ 2014-01-22  5:04 UTC (permalink / raw
  To: gentoo-commits

commit:     348fec85f88ff4e504c3404ae00e1c2509a9114c
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 27 23:41:39 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 18:02:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=348fec85

Strip trailing slash from subpath's if they exist when creating filenames.

This bug was introduced in commit 52c9d37ff5de18981d6ecbe5bdde524b2bf4ebda when a trailing slash was added to target_subpath.

---
 catalyst/base/stagebase.py        | 10 +++++-----
 catalyst/targets/livecd_stage2.py |  2 +-
 catalyst/targets/stage2.py        |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0105723..b0144f6 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -314,7 +314,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	def set_target_path(self):
 		self.settings["target_path"]=normpath(self.settings["storedir"]+\
-			"/builds/"+self.settings["target_subpath"]+".tar.bz2")
+			"/builds/"+self.settings["target_subpath"].rstrip('/')+".tar.bz2")
 		if "autoresume" in self.settings["options"]\
 			and self.resume.is_enabled("setup_target_path"):
 			print \
@@ -398,7 +398,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				"/tmp/"+self.settings["source_subpath"])
 		else:
 			self.settings["source_path"]=normpath(self.settings["storedir"]+\
-				"/builds/"+self.settings["source_subpath"]+".tar.bz2")
+				"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2")
 			if os.path.isfile(self.settings["source_path"]):
 				# XXX: Is this even necessary if the previous check passes?
 				if os.path.exists(self.settings["source_path"]):
@@ -413,7 +413,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			print "\tseedcache in the options of catalyst.conf the source path"
 			print "\twill then be "+\
 				normpath(self.settings["storedir"]+"/builds/"+\
-				self.settings["source_subpath"]+".tar.bz2\n")
+				self.settings["source_subpath"].rstrip('/')+".tar.bz2\n")
 
 	def set_dest_path(self):
 		if "root_path" in self.settings:
@@ -429,7 +429,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 	def set_snapshot_path(self):
 		self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
 			"/snapshots/" + self.settings["snapshot_name"] +
-			self.settings["snapshot"]+".tar.xz")
+			self.settings["snapshot"].rstrip('/')+".tar.xz")
 
 		if os.path.exists(self.settings["snapshot_path"]):
 			self.settings["snapshot_path_hash"]=\
@@ -440,7 +440,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
 				"/snapshots/" + self.settings["snapshot_name"] +
-				self.settings["snapshot"]+".tar.bz2")
+				self.settings["snapshot"].rstrip('/')+".tar.bz2")
 
 			if os.path.exists(self.settings["snapshot_path"]):
 				self.settings["snapshot_path_hash"]=\

diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index 8fc406b..4016f57 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -38,7 +38,7 @@ 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"]+".tar.bz2")
+		self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2")
 		if os.path.isfile(self.settings["source_path"]):
 			self.settings["source_path_hash"] = \
 				self.settings["hash_map"].generate_hash(

diff --git a/catalyst/targets/stage2.py b/catalyst/targets/stage2.py
index c447fac..116871c 100644
--- a/catalyst/targets/stage2.py
+++ b/catalyst/targets/stage2.py
@@ -23,7 +23,7 @@ class stage2(StageBase):
 		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"]+".tar.bz2")
+			self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2")
 			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?
@@ -35,7 +35,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"]+".tar.bz2\n")
+			print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2\n")
 
 	# XXX: How do these override_foo() functions differ from the ones in
 	# StageBase and why aren't they in stage3_target?


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/, catalyst/targets/
@ 2014-01-22  5:04 Brian Dolbec
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Dolbec @ 2014-01-22  5:04 UTC (permalink / raw
  To: gentoo-commits

commit:     4a9d5b0d05d8de042097be32ae3273f8e2418c7d
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 12 14:40:12 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 18:01:19 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=4a9d5b0d

Fix livecd source and target paths not ending with a slash

---
 catalyst/base/stagebase.py        | 2 +-
 catalyst/targets/livecd_stage1.py | 3 +--
 catalyst/targets/livecd_stage2.py | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 1db0f81..0105723 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -285,7 +285,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 	def set_target_subpath(self):
 		self.settings["target_subpath"]=self.settings["rel_type"]+"/"+\
 				self.settings["target"]+"-"+self.settings["subarch"]+"-"+\
-				self.settings["version_stamp"]
+				self.settings["version_stamp"] +'/'
 
 	def set_source_subpath(self):
 		if type(self.settings["source_subpath"])!=types.StringType:

diff --git a/catalyst/targets/livecd_stage1.py b/catalyst/targets/livecd_stage1.py
index 55859bc..8402e7a 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..."
@@ -43,7 +43,6 @@ class livecd_stage1(StageBase):
 				cmd("rm -rf "+self.settings["target_path"],\
 					"Could not remove existing directory: "+self.settings["target_path"],env=self.env)
 				self.resume.enable("setup_target_path")
-
 			ensure_dirs(self.settings["target_path"])
 
 	def set_spec_prefix(self):

diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index c22fa0f..8fc406b 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -44,7 +44,7 @@ class livecd_stage2(StageBase):
 				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.",


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-22  5:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-28  1:04 [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/, catalyst/targets/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2014-01-22  5:04 Brian Dolbec
2014-01-22  5:04 Brian Dolbec
2013-11-21  9:06 Brian Dolbec
2013-11-21  9:06 Brian Dolbec
2013-06-18 20:44 Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox