public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     b5fb1937d5da5a2befe756dfe93eb6cdb2135892
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 22 04:51:13 2013 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:18 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=b5fb1937

modules/generic_stage_target.py: Use 'portdir' instead of hard-coding '/usr/portage'

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 0871cba..0803a8c 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -1064,7 +1064,7 @@ class generic_stage_target(generic_target):
 						"/use will cause portage to ignore"
 					print "\tpackage.use in the profile and portage_confdir. You've been warned!"
 
-			myf.write('PORTDIR="/usr/portage"\n')
+			myf.write('PORTDIR="%s"\n' % self.settings['portdir'])
 			myf.write('DISTDIR="${PORTDIR}/distfiles"\n')
 			myf.write('PKGDIR="${PORTDIR}/packages"\n')
 


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2014-01-06  2:00 Brian Dolbec
  0 siblings, 0 replies; 44+ messages in thread
From: Brian Dolbec @ 2014-01-06  2:00 UTC (permalink / raw
  To: gentoo-commits

commit:     e5a9e20376397f2714aa7a835b7f42f71fcc38d9
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 30 23:57:28 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 06:39:31 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=e5a9e203

catalyst/targets/generic_stage_target.py: mount /dev/shm on linux

Add shm targets defaults. Anthony G. Basile <blueness <AT> gentoo.org>
Some build systems require /dev/shm to be mounted, like python's
build system.  We make sure that on Linux systems, /dev/shm is
mounted in the stage chroots.  See bug #496328.

Douglas Freed <dwfreed <AT> mtu.edu> :
Mount /dev/shm in the chroot with the right options
Bind mounting /dev/shm into the chroot isn't a good idea, as there may
be collisions and result in weird side effects.  Instead, we can just
mount a new tmpfs there, with the right options to ensure security.

(Forward ported to pending branch from 2.X Brian Dolbec)
Conflicts:
	catalyst/targets/generic_stage_target.py

---
 modules/generic_stage_target.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 790e4da..3d66231 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -20,6 +20,7 @@ TARGET_MOUNTS_DEFAULTS = {
 	"port_tmpdir": "/var/tmp/portage",
 	"port_logdir": "/var/log/portage",
 	"proc": "/proc",
+	"shm": "/dev/shm",
 	}
 
 SOURCE_MOUNTS_DEFAULTS = {
@@ -29,6 +30,7 @@ SOURCE_MOUNTS_DEFAULTS = {
 	"portdir": "/usr/portage",
 	"port_tmpdir": "tmpfs",
 	"proc": "/proc",
+	"shm": "shmfs",
 	}
 
 
@@ -218,6 +220,7 @@ class generic_stage_target(generic_target):
 			#self.mountmap["portdir"] = None
 		if os.uname()[0] == "Linux":
 			self.mounts.append("devpts")
+			self.mounts.append("shm")
 
 		self.set_mounts()
 
@@ -938,7 +941,7 @@ class generic_stage_target(generic_target):
 				os.makedirs(target, 0755)
 
 			if not os.path.exists(self.mountmap[x]):
-				if not self.mountmap[x] == "tmpfs":
+				if self.mountmap[x] not in ["tmpfs", "shmfs"]:
 					os.makedirs(self.mountmap[x], 0755)
 
 			src=self.mountmap[x]
@@ -959,6 +962,9 @@ class generic_stage_target(generic_target):
 							self.settings["var_tmpfs_portage"] + "G " + \
 							src + " " + target
 						retval=os.system(cmd)
+				elif src == "shmfs":
+					cmd = "mount -t tmpfs -o noexec,nosuid,nodev shm " + target
+					retval=os.system(cmd)
 				else:
 					cmd = "mount --bind " + src + " " + target
 					#print "bind(); cmd =", cmd


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2014-01-06  2:00 Brian Dolbec
  0 siblings, 0 replies; 44+ messages in thread
From: Brian Dolbec @ 2014-01-06  2:00 UTC (permalink / raw
  To: gentoo-commits

commit:     7a4705adf2578f8131ae5fa4192d383c82a0516d
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 17 06:22:05 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 04:39:28 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=7a4705ad

modules/generic_stage_target.py, modules/stage1_target.py: Add a target_mounts dictionary

Temporary location to define TARGET_MOUNTS_DEFAULTS.
It will be moved to a new defaults.py file in a later commit.
I also plan to make them configurable.

Also:
* Clean up all self.mounts, self.mountmap usage.
* Replace multiple path additions with one instance at the
  beginning of the function, reuse the result multiple times.
* Add some extra debug prints (to be converted to logging later)

---
 modules/generic_stage_target.py | 83 ++++++++++++++++++++++++++---------------
 modules/stage1_target.py        |  5 ++-
 2 files changed, 55 insertions(+), 33 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 8cc6dc1..63a8ff5 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -8,6 +8,20 @@ import catalyst_lock
 PORT_LOGDIR_CLEAN = \
 	'find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +30 -delete'
 
+TARGET_MOUNTS_DEFAULTS = {
+	"ccache": "/var/tmp/ccache",
+	"dev": "/dev",
+	"devpts": "/dev/pts",
+	"distdir": "/usr/portage/distfiles",
+	"icecream": "/usr/lib/icecc/bin",
+	"kerncache": "/tmp/kerncache",
+	"packagedir": "/usr/portage/packages",
+	"portdir": "/usr/portage",
+	"port_tmpdir": "/var/tmp/portage",
+	"port_logdir": "/var/log/portage",
+	"proc": "/proc",
+	}
+
 
 class generic_stage_target(generic_target):
 	"""
@@ -178,6 +192,8 @@ class generic_stage_target(generic_target):
 			file_locate(self.settings,["portage_confdir"],expand=0)
 
 		""" Setup our mount points """
+		# initialize our target mounts.
+		self.target_mounts = TARGET_MOUNTS_DEFAULTS.copy()
 		if "SNAPCACHE" in self.settings:
 			self.mounts = ["proc", "dev", "portdir", "distdir", "port_tmpdir"]
 			self.mountmap = {
@@ -231,12 +247,13 @@ class generic_stage_target(generic_target):
 			self.mounts.append("ccache")
 			self.mountmap["ccache"] = ccdir
 			""" for the chroot: """
-			self.env["CCACHE_DIR"]="/var/tmp/ccache"
+			self.env["CCACHE_DIR"] = self.target_mounts["ccache"]
 
 		if "ICECREAM" in self.settings:
 			self.mounts.append("/var/cache/icecream")
 			self.mountmap["/var/cache/icecream"]="/var/cache/icecream"
-			self.env["PATH"]="/usr/lib/icecc/bin:"+self.env["PATH"]
+			self.env["PATH"] = self.target_mounts["icecream"] + ":" + \
+				self.env["PATH"]
 
 		if "port_logdir" in self.settings:
 			self.mounts.append("port_logdir")
@@ -615,33 +632,34 @@ class generic_stage_target(generic_target):
 				"kill-chroot-pids script failed.",env=self.env)
 
 	def mount_safety_check(self):
-		mypath=self.settings["chroot_path"]
-
 		"""
 		Check and verify that none of our paths in mypath are mounted. We don't
 		want to clean up with things still mounted, and this allows us to check.
 		Returns 1 on ok, 0 on "something is still mounted" case.
 		"""
 
-		if not os.path.exists(mypath):
+		if not os.path.exists(self.settings["chroot_path"]):
 			return
 
+		print "self.mounts =", self.mounts
 		for x in self.mounts:
-			if not os.path.exists(mypath + self.mountmap[x]):
+			target = normpath(self.settings["chroot_path"] + self.target_mounts[x])
+			print "mount_safety_check() x =", x, target
+			if not os.path.exists(target):
 				continue
 
-			if ismount(mypath + self.mountmap[x]):
+			if ismount(target):
 				""" Something is still mounted "" """
 				try:
-					print self.mountmap[x] + " is still mounted; performing auto-bind-umount...",
+					print target + " is still mounted; performing auto-bind-umount...",
 					""" Try to umount stuff ourselves """
 					self.unbind()
-					if ismount(mypath + self.mountmap[x]):
-						raise CatalystError, "Auto-unbind failed for " + self.mountmap[x]
+					if ismount(target):
+						raise CatalystError, "Auto-unbind failed for " + target
 					else:
 						print "Auto-unbind successful..."
 				except CatalystError:
-					raise CatalystError, "Unable to auto-unbind " + self.mountmap[x]
+					raise CatalystError, "Unable to auto-unbind " + target
 
 	def unpack(self):
 		unpack=True
@@ -909,12 +927,14 @@ class generic_stage_target(generic_target):
 
 	def bind(self):
 		for x in self.mounts:
-			if not os.path.exists(self.settings["chroot_path"] + self.mountmap[x]):
-				os.makedirs(self.settings["chroot_path"]+x,0755)
+			#print "bind(); x =", x
+			target = normpath(self.settings["chroot_path"] + self.target_mounts[x])
+			if not os.path.exists(target):
+				os.makedirs(target, 0755)
 
 			if not os.path.exists(self.mountmap[x]):
 				if not self.mountmap[x] == "tmpfs":
-					os.makedirs(self.mountmap[x],0755)
+					os.makedirs(self.mountmap[x], 0755)
 
 			src=self.mountmap[x]
 			#print "bind(); src =", src
@@ -922,20 +942,22 @@ class generic_stage_target(generic_target):
 				self.snapshot_lock_object.read_lock()
 			if os.uname()[0] == "FreeBSD":
 				if src == "/dev":
-					retval = os.system("mount -t devfs none " +
-						self.settings["chroot_path"] + src)
+					cmd = "mount -t devfs none " + target
+					retval=os.system(cmd)
 				else:
-					retval = os.system("mount_nullfs " + src + " " +
-						self.settings["chroot_path"] + src)
+					cmd = "mount_nullfs " + src + " " + target
+					retval=os.system(cmd)
 			else:
 				if src == "tmpfs":
 					if "var_tmpfs_portage" in self.settings:
-						retval=os.system("mount -t tmpfs -o size="+\
-							self.settings["var_tmpfs_portage"]+"G "+src+" "+\
-							self.settings["chroot_path"]+x)
+						cmd = "mount -t tmpfs -o size=" + \
+							self.settings["var_tmpfs_portage"] + "G " + \
+							src + " " + target
+						retval=os.system(cmd)
 				else:
-					retval = os.system("mount --bind " + src + " " +
-						self.settings["chroot_path"] + src)
+					cmd = "mount --bind " + src + " " + target
+					#print "bind(); cmd =", cmd
+					retval=os.system(cmd)
 			if retval!=0:
 				self.unbind()
 				raise CatalystError,"Couldn't bind mount " + src
@@ -947,26 +969,25 @@ class generic_stage_target(generic_target):
 		myrevmounts.reverse()
 		""" Unmount in reverse order for nested bind-mounts """
 		for x in myrevmounts:
-			if not os.path.exists(mypath + self.mountmap[x]):
+			target = normpath(mypath + self.target_mounts[x])
+			if not os.path.exists(target):
 				continue
 
-			if not ismount(mypath + self.mountmap[x]):
+			if not ismount(target):
 				continue
 
-			retval=os.system("umount "+\
-				os.path.join(mypath, self.mountmap[x].lstrip(os.path.sep)))
+			retval=os.system("umount " + target)
 
 			if retval!=0:
-				warn("First attempt to unmount: " + mypath +
-					self.mountmap[x] +" failed.")
+				warn("First attempt to unmount: " + target + " failed.")
 				warn("Killing any pids still running in the chroot")
 
 				self.kill_chroot_pids()
 
-				retval2 = os.system("umount " + mypath + self.mountmap[x])
+				retval2 = os.system("umount " + target)
 				if retval2!=0:
 					ouch=1
-					warn("Couldn't umount bind mount: " + mypath + self.mountmap[x])
+					warn("Couldn't umount bind mount: " + target)
 
 			if "SNAPCACHE" in self.settings and x == "/usr/portage":
 				try:

diff --git a/modules/stage1_target.py b/modules/stage1_target.py
index aa43926..5f4ffa0 100644
--- a/modules/stage1_target.py
+++ b/modules/stage1_target.py
@@ -88,8 +88,9 @@ class stage1_target(generic_stage_target):
 			os.makedirs(self.settings["stage_path"]+"/proc")
 
 		# alter the mount mappings to bind mount proc onto it
-		self.mounts.append("/tmp/stage1root/proc")
-		self.mountmap["/tmp/stage1root/proc"]="/proc"
+		self.mounts.append("stage1root/proc")
+		self.target_mounts["stage1root/proc"] = "/tmp/stage1root/proc"
+		self.mountmap["stage1root/proc"] = "/proc"
 
 def register(foo):
 	foo.update({"stage1":stage1_target})


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2014-01-06  2:00 Brian Dolbec
  0 siblings, 0 replies; 44+ messages in thread
From: Brian Dolbec @ 2014-01-06  2:00 UTC (permalink / raw
  To: gentoo-commits

commit:     5f0fce9876dea3f8fdc7127f7658239792cb526b
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 15 22:53:32 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue Dec 31 00:38:53 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=5f0fce98

modules/generic_stage_target.py: Use portdir, distdir, ... instead of paths for keys

If snapcache is enabled, self.mounts and self.mountmap had not been
modified like they were if it was not enabled.

Added a print statement for debugging to be converted to logging in
the future.

---
 modules/generic_stage_target.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 3e60f72..6c8cdbc 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -174,10 +174,10 @@ class generic_stage_target(generic_target):
 
 		""" Setup our mount points """
 		if "SNAPCACHE" in self.settings:
-			self.mounts=["/proc","/dev","/usr/portage","/usr/portage/distfiles","/var/tmp/portage"]
-			self.mountmap={"/proc":"/proc","/dev":"/dev","devpts":"/dev/pts",
-				"/usr/portage":self.settings["snapshot_cache_path"]+"/portage",\
-				"/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
+			self.mounts=["proc", "dev", "portdir", "distdir", "port_tmpdir"]
+			self.mountmap={"proc": "/proc", "dev": "/dev", "devpts": "/dev/pts",
+				"portdir": self.settings["snapshot_cache_path"] + "/portage",
+				"distdir": self.settings["distdir"], "port_tmpdir": "tmpfs"}
 		else:
 			self.mounts = ["proc", "dev", "distdir", "port_tmpdir"]
 			self.mountmap = {"proc":"/proc", "dev":"/dev", "devpts":"/dev/pts",
@@ -904,7 +904,8 @@ class generic_stage_target(generic_target):
 					os.makedirs(self.mountmap[x],0755)
 
 			src=self.mountmap[x]
-			if "SNAPCACHE" in self.settings and x == "/usr/portage":
+			#print "bind(); src =", src
+			if "SNAPCACHE" in self.settings and x == "portdir":
 				self.snapshot_lock_object.read_lock()
 			if os.uname()[0] == "FreeBSD":
 				if src == "/dev":


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2014-01-06  2:00 Brian Dolbec
  0 siblings, 0 replies; 44+ messages in thread
From: Brian Dolbec @ 2014-01-06  2:00 UTC (permalink / raw
  To: gentoo-commits

commit:     20c1975bd68784bdcf37d0d95de96333881fc272
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 19 04:27:04 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 04:39:22 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=20c1975b

Fix a missed self.settings["repo_name"] migration

Use normpath() on it as well.
Fix the coding style in the lines touched.

---
 modules/generic_stage_target.py | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 6c8cdbc..ce43c79 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -174,10 +174,18 @@ class generic_stage_target(generic_target):
 
 		""" Setup our mount points """
 		if "SNAPCACHE" in self.settings:
-			self.mounts=["proc", "dev", "portdir", "distdir", "port_tmpdir"]
-			self.mountmap={"proc": "/proc", "dev": "/dev", "devpts": "/dev/pts",
-				"portdir": self.settings["snapshot_cache_path"] + "/portage",
-				"distdir": self.settings["distdir"], "port_tmpdir": "tmpfs"}
+			self.mounts = ["proc", "dev", "portdir", "distdir", "port_tmpdir"]
+			self.mountmap = {
+				"dev": "/dev",
+				"devpts": "/dev/pts",
+				"distdir": self.settings["distdir"],
+				"portdir": normpath("/".join([
+					self.settings["snapshot_cache_path"],
+					self.settings["repo_name"],
+					])),
+				"port_tmpdir": "tmpfs",
+				"proc": "/proc",
+				}
 		else:
 			self.mounts = ["proc", "dev", "distdir", "port_tmpdir"]
 			self.mountmap = {"proc":"/proc", "dev":"/dev", "devpts":"/dev/pts",


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: modules/
@ 2014-01-03  6:12 Brian Dolbec
  2014-01-06  2:00 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
  0 siblings, 1 reply; 44+ messages in thread
From: Brian Dolbec @ 2014-01-03  6:12 UTC (permalink / raw
  To: gentoo-commits

commit:     f48028dc0e9ed1da8413f5fc486b43f2d3d5342a
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 30 23:56:02 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 05:29:37 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=f48028dc

modules/generic_stage_target.py, Create SOURCE_MOUNTS_DEFAULTS

Similarly to TARGET_MOUNTS_DEFAULTS this is a temporary location.
This will simplify the migration to being fully configurable.
It also simplifies initialization somewhat.

---
 modules/generic_stage_target.py | 39 ++++++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 17 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 7919f07..790e4da 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -22,6 +22,15 @@ TARGET_MOUNTS_DEFAULTS = {
 	"proc": "/proc",
 	}
 
+SOURCE_MOUNTS_DEFAULTS = {
+	"dev": "/dev",
+	"devpts": "/dev/pts",
+	"distdir": "/usr/portage/distfiles",
+	"portdir": "/usr/portage",
+	"port_tmpdir": "tmpfs",
+	"proc": "/proc",
+	}
+
 
 class generic_stage_target(generic_target):
 	"""
@@ -194,23 +203,19 @@ class generic_stage_target(generic_target):
 		""" Setup our mount points """
 		# initialize our target mounts.
 		self.target_mounts = TARGET_MOUNTS_DEFAULTS.copy()
-		if "SNAPCACHE" in self.settings:
-			self.mounts = ["proc", "dev", "portdir", "distdir", "port_tmpdir"]
-			self.mountmap = {
-				"dev": "/dev",
-				"devpts": "/dev/pts",
-				"distdir": self.settings["distdir"],
-				"portdir": normpath("/".join([
-					self.settings["snapshot_cache_path"],
-					self.settings["repo_name"],
-					])),
-				"port_tmpdir": "tmpfs",
-				"proc": "/proc",
-				}
-		else:
-			self.mounts = ["proc", "dev", "distdir", "port_tmpdir"]
-			self.mountmap = {"proc":"/proc", "dev":"/dev", "devpts":"/dev/pts",
-				"distdir":self.settings["distdir"], "port_tmpdir":"tmpfs"}
+
+		self.mounts = ["proc", "dev", "portdir", "distdir", "port_tmpdir"]
+		# initialize our source mounts
+		self.mountmap = SOURCE_MOUNTS_DEFAULTS.copy()
+		# update them from settings
+		self.mountmap["distdir"] = self.settings["distdir"]
+		self.mountmap["portdir"] = normpath("/".join([
+			self.settings["snapshot_cache_path"],
+			self.settings["repo_name"],
+			]))
+		if "SNAPCACHE" not in self.settings:
+			self.mounts.remove("portdir")
+			#self.mountmap["portdir"] = None
 		if os.uname()[0] == "Linux":
 			self.mounts.append("devpts")
 


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: modules/
@ 2014-01-03  5:03 Brian Dolbec
  2014-01-06  2:00 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
  0 siblings, 1 reply; 44+ messages in thread
From: Brian Dolbec @ 2014-01-03  5:03 UTC (permalink / raw
  To: gentoo-commits

commit:     4da24c6ed4ae87c4653b051924269915925178f9
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 29 09:03:14 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 04:39:28 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=4da24c6e

Fix mounts and mountmap port_logdir code block.

---
 modules/generic_stage_target.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index ce43c79..8cc6dc1 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -4,6 +4,11 @@ from generic_target import *
 from stat import *
 import catalyst_lock
 
+
+PORT_LOGDIR_CLEAN = \
+	'find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +30 -delete'
+
+
 class generic_stage_target(generic_target):
 	"""
 	This class does all of the chroot setup, copying of files, etc. It is
@@ -234,10 +239,10 @@ class generic_stage_target(generic_target):
 			self.env["PATH"]="/usr/lib/icecc/bin:"+self.env["PATH"]
 
 		if "port_logdir" in self.settings:
-			self.mounts.append("/var/log/portage")
-			self.mountmap["/var/log/portage"]=self.settings["port_logdir"]
-			self.env["PORT_LOGDIR"]="/var/log/portage"
-			self.env["PORT_LOGDIR_CLEAN"]='find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +30 -delete'
+			self.mounts.append("port_logdir")
+			self.mountmap["port_logdir"] = self.settings["port_logdir"]
+			self.env["PORT_LOGDIR"] = self.settings["port_logdir"]
+			self.env["PORT_LOGDIR_CLEAN"] = PORT_LOGDIR_CLEAN
 
 	def override_cbuild(self):
 		if "CBUILD" in self.makeconf:


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15 21:33 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15 21:33 UTC (permalink / raw
  To: gentoo-commits

commit:     3f440381f4d886ba3a80606d392173028247d49f
Author:     Matt Turner <mattst88 <AT> gmail <DOT> com>
AuthorDate: Sun Dec 15 20:31:20 2013 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 20:33:42 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=3f440381

modules/generic_stage_target.py: Use 'devpts' as mountmap key.

Missed in 0c68d30b. Would cause catalyst to fail if snapcache were
enabled.

Tested-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 8c983e1..3e60f72 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -175,7 +175,7 @@ class generic_stage_target(generic_target):
 		""" Setup our mount points """
 		if "SNAPCACHE" in self.settings:
 			self.mounts=["/proc","/dev","/usr/portage","/usr/portage/distfiles","/var/tmp/portage"]
-			self.mountmap={"/proc":"/proc","/dev":"/dev","/dev/pts":"/dev/pts",\
+			self.mountmap={"/proc":"/proc","/dev":"/dev","devpts":"/dev/pts",
 				"/usr/portage":self.settings["snapshot_cache_path"]+"/portage",\
 				"/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
 		else:


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     a3f76f3ea4831dccbe6401520cfee9f2f81f5bc1
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 02:56:04 2012 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:45 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=a3f76f3e

modules/generic_stage_target.py: Use 'kerncache' instead of '/tmp/kerncache' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index dc02ad2..6a9b980 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -202,8 +202,8 @@ class generic_stage_target(generic_target):
 			self.set_kerncache_path()
 			print "Location of the kerncache is "+\
 				self.settings["kerncache_path"]
-			self.mounts.append("/tmp/kerncache")
-			self.mountmap["/tmp/kerncache"]=self.settings["kerncache_path"]
+			self.mounts.append("kerncache")
+			self.mountmap["kerncache"] = self.settings["kerncache_path"]
 
 		if "CCACHE" in self.settings:
 			if "CCACHE_DIR" in os.environ:


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     9bf89937a904e6d0d5d27b20a224469d631e0599
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 02:56:04 2012 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:40 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=9bf89937

modules/generic_stage_target.py: Use 'port_tmpdir' instead of '/var/tmp/portage' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index e5bdf91..2426b12 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -179,9 +179,9 @@ class generic_stage_target(generic_target):
 				"/usr/portage":self.settings["snapshot_cache_path"]+"/portage",\
 				"/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
 		else:
-			self.mounts = ["proc", "dev", "distdir", "/var/tmp/portage"]
+			self.mounts = ["proc", "dev", "distdir", "port_tmpdir"]
 			self.mountmap = {"proc":"/proc", "dev":"/dev", "/dev/pts":"/dev/pts",\
-				"distdir":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
+				"distdir":self.settings["distdir"], "port_tmpdir":"tmpfs"}
 		if os.uname()[0] == "Linux":
 			self.mounts.append("/dev/pts")
 


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     0c68d30bf1c5ed224c9ec5cbbeda2dcf0ac128d3
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 02:56:04 2012 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:42 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=0c68d30b

modules/generic_stage_target.py: Use 'devpts' instead of '/dev/pts' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 2426b12..f8dd352 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -180,10 +180,10 @@ class generic_stage_target(generic_target):
 				"/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
 		else:
 			self.mounts = ["proc", "dev", "distdir", "port_tmpdir"]
-			self.mountmap = {"proc":"/proc", "dev":"/dev", "/dev/pts":"/dev/pts",\
+			self.mountmap = {"proc":"/proc", "dev":"/dev", "devpts":"/dev/pts",
 				"distdir":self.settings["distdir"], "port_tmpdir":"tmpfs"}
 		if os.uname()[0] == "Linux":
-			self.mounts.append("/dev/pts")
+			self.mounts.append("devpts")
 
 		self.set_mounts()
 


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     85861ac2ec6f9258bcad57d230e5820a81ab65b3
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 02:56:04 2012 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:44 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=85861ac2

modules/generic_stage_target.py: Use 'packagedir' instead of '/usr/portage/packages' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index f8dd352..dc02ad2 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -195,9 +195,8 @@ class generic_stage_target(generic_target):
 			self.set_pkgcache_path()
 			print "Location of the package cache is "+\
 				self.settings["pkgcache_path"]
-			self.mounts.append("/usr/portage/packages")
-			self.mountmap["/usr/portage/packages"]=\
-				self.settings["pkgcache_path"]
+			self.mounts.append("packagedir")
+			self.mountmap["packagedir"] = self.settings["pkgcache_path"]
 
 		if "KERNCACHE" in self.settings:
 			self.set_kerncache_path()


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     88319d2c10cc1394470e357bfc9f51a625669f7f
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 02:56:04 2012 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:47 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=88319d2c

modules/generic_stage_target.py: Use 'ccache' instead of '/var/tmp/ccache' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 6a9b980..8c983e1 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -215,8 +215,8 @@ class generic_stage_target(generic_target):
 				raise CatalystError,\
 					"Compiler cache support can't be enabled (can't find "+\
 					ccdir+")"
-			self.mounts.append("/var/tmp/ccache")
-			self.mountmap["/var/tmp/ccache"]=ccdir
+			self.mounts.append("ccache")
+			self.mountmap["ccache"] = ccdir
 			""" for the chroot: """
 			self.env["CCACHE_DIR"]="/var/tmp/ccache"
 


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     f5d71db83e1c01ae0bb228b9c72524408ad8012c
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 02:56:04 2012 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:39 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=f5d71db8

modules/generic_stage_target.py: Use 'distdir' instead of '/usr/portage/distfiles' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index bf43eff..e5bdf91 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -179,9 +179,9 @@ class generic_stage_target(generic_target):
 				"/usr/portage":self.settings["snapshot_cache_path"]+"/portage",\
 				"/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
 		else:
-			self.mounts = ["proc", "dev","/usr/portage/distfiles", "/var/tmp/portage"]
+			self.mounts = ["proc", "dev", "distdir", "/var/tmp/portage"]
 			self.mountmap = {"proc":"/proc", "dev":"/dev", "/dev/pts":"/dev/pts",\
-				"/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
+				"distdir":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
 		if os.uname()[0] == "Linux":
 			self.mounts.append("/dev/pts")
 


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     ec2bb61d80a909f76114119aea3663f9198ea532
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 02:56:04 2012 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:36 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=ec2bb61d

modules/generic_stage_target.py: Use 'dev' instead of '/dev' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 490430f..bf43eff 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -179,8 +179,8 @@ class generic_stage_target(generic_target):
 				"/usr/portage":self.settings["snapshot_cache_path"]+"/portage",\
 				"/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
 		else:
-			self.mounts = ["proc","/dev","/usr/portage/distfiles","/var/tmp/portage"]
-			self.mountmap = {"proc":"/proc", "/dev":"/dev", "/dev/pts":"/dev/pts",\
+			self.mounts = ["proc", "dev","/usr/portage/distfiles", "/var/tmp/portage"]
+			self.mountmap = {"proc":"/proc", "dev":"/dev", "/dev/pts":"/dev/pts",\
 				"/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
 		if os.uname()[0] == "Linux":
 			self.mounts.append("/dev/pts")


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     d6361de63818955d642722c41a0513b4992278ba
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 02:56:04 2012 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:34 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=d6361de6

modules/generic_stage_target.py: Use 'proc' instead of '/proc' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index a68b356..490430f 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -179,8 +179,8 @@ class generic_stage_target(generic_target):
 				"/usr/portage":self.settings["snapshot_cache_path"]+"/portage",\
 				"/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
 		else:
-			self.mounts=["/proc","/dev","/usr/portage/distfiles","/var/tmp/portage"]
-			self.mountmap={"/proc":"/proc","/dev":"/dev","/dev/pts":"/dev/pts",\
+			self.mounts = ["proc","/dev","/usr/portage/distfiles","/var/tmp/portage"]
+			self.mountmap = {"proc":"/proc", "/dev":"/dev", "/dev/pts":"/dev/pts",\
 				"/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
 		if os.uname()[0] == "Linux":
 			self.mounts.append("/dev/pts")


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     463d98fe94041313e0cb4497081858ab5d9121f3
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 02:56:04 2012 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:23 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=463d98fe

modules/generic_stage_target.py: Use a 'local_overlay' setting instead of hard-coding '/usr/local/portage'

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index fc54fbf..6ee35d2 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -872,10 +872,10 @@ class generic_stage_target(generic_target):
 				if os.path.exists(x):
 					print "Copying overlay dir " +x
 					cmd("mkdir -p "+self.settings["chroot_path"]+\
-						"/usr/local/portage",\
+						self.settings["local_overlay"],\
 						"Could not make portage_overlay dir",env=self.env)
 					cmd("cp -R "+x+"/* "+self.settings["chroot_path"]+\
-						"/usr/local/portage",\
+						self.settings["local_overlay"],\
 						"Could not copy portage_overlay",env=self.env)
 
 	def root_overlay(self):
@@ -1116,9 +1116,9 @@ class generic_stage_target(generic_target):
 				"Could not replace /etc/hosts",env=self.env)
 
 		""" Remove our overlay """
-		if os.path.exists(self.settings["chroot_path"]+"/usr/local/portage"):
-			cmd("rm -rf "+self.settings["chroot_path"]+"/usr/local/portage",\
-				"Could not remove /usr/local/portage",env=self.env)
+		if os.path.exists(self.settings["chroot_path"] + self.settings["local_overlay"]):
+			cmd("rm -rf " + self.settings["chroot_path"] + self.settings["local_overlay"],
+				"Could not remove " + self.settings["local_overlay"], env=self.env)
 			cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\
 				"/etc/portage/make.conf",\
 				"Could not remove PORTDIR_OVERLAY from make.conf",env=self.env)


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     ec7d53c6a24b95d9067bbd7288ea0c0a7b540109
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 02:56:04 2012 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:33 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=ec7d53c6

modules/generic_stage_target.py: Don't use paths as mountmap keys

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 41 +++++++++++++++++++++--------------------
 1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index c890773..a68b356 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -615,21 +615,21 @@ class generic_stage_target(generic_target):
 			return
 
 		for x in self.mounts:
-			if not os.path.exists(mypath+x):
+			if not os.path.exists(mypath + self.mountmap[x]):
 				continue
 
-			if ismount(mypath+x):
+			if ismount(mypath + self.mountmap[x]):
 				""" Something is still mounted "" """
 				try:
-					print x+" is still mounted; performing auto-bind-umount...",
+					print self.mountmap[x] + " is still mounted; performing auto-bind-umount...",
 					""" Try to umount stuff ourselves """
 					self.unbind()
-					if ismount(mypath+x):
-						raise CatalystError, "Auto-unbind failed for "+x
+					if ismount(mypath + self.mountmap[x]):
+						raise CatalystError, "Auto-unbind failed for " + self.mountmap[x]
 					else:
 						print "Auto-unbind successful..."
 				except CatalystError:
-					raise CatalystError, "Unable to auto-unbind "+x
+					raise CatalystError, "Unable to auto-unbind " + self.mountmap[x]
 
 	def unpack(self):
 		unpack=True
@@ -897,7 +897,7 @@ class generic_stage_target(generic_target):
 
 	def bind(self):
 		for x in self.mounts:
-			if not os.path.exists(self.settings["chroot_path"]+x):
+			if not os.path.exists(self.settings["chroot_path"] + self.mountmap[x]):
 				os.makedirs(self.settings["chroot_path"]+x,0755)
 
 			if not os.path.exists(self.mountmap[x]):
@@ -909,11 +909,11 @@ class generic_stage_target(generic_target):
 				self.snapshot_lock_object.read_lock()
 			if os.uname()[0] == "FreeBSD":
 				if src == "/dev":
-					retval=os.system("mount -t devfs none "+\
-						self.settings["chroot_path"]+x)
+					retval = os.system("mount -t devfs none " +
+						self.settings["chroot_path"] + src)
 				else:
-					retval=os.system("mount_nullfs "+src+" "+\
-						self.settings["chroot_path"]+x)
+					retval = os.system("mount_nullfs " + src + " " +
+						self.settings["chroot_path"] + src)
 			else:
 				if src == "tmpfs":
 					if "var_tmpfs_portage" in self.settings:
@@ -921,11 +921,11 @@ class generic_stage_target(generic_target):
 							self.settings["var_tmpfs_portage"]+"G "+src+" "+\
 							self.settings["chroot_path"]+x)
 				else:
-					retval=os.system("mount --bind "+src+" "+\
-						self.settings["chroot_path"]+x)
+					retval = os.system("mount --bind " + src + " " +
+						self.settings["chroot_path"] + src)
 			if retval!=0:
 				self.unbind()
-				raise CatalystError,"Couldn't bind mount "+src
+				raise CatalystError,"Couldn't bind mount " + src
 
 	def unbind(self):
 		ouch=0
@@ -934,25 +934,26 @@ class generic_stage_target(generic_target):
 		myrevmounts.reverse()
 		""" Unmount in reverse order for nested bind-mounts """
 		for x in myrevmounts:
-			if not os.path.exists(mypath+x):
+			if not os.path.exists(mypath + self.mountmap[x]):
 				continue
 
-			if not ismount(mypath+x):
+			if not ismount(mypath + self.mountmap[x]):
 				continue
 
 			retval=os.system("umount "+\
-				os.path.join(mypath,x.lstrip(os.path.sep)))
+				os.path.join(mypath, self.mountmap[x].lstrip(os.path.sep)))
 
 			if retval!=0:
-				warn("First attempt to unmount: "+mypath+x+" failed.")
+				warn("First attempt to unmount: " + mypath +
+					self.mountmap[x] +" failed.")
 				warn("Killing any pids still running in the chroot")
 
 				self.kill_chroot_pids()
 
-				retval2=os.system("umount "+mypath+x)
+				retval2 = os.system("umount " + mypath + self.mountmap[x])
 				if retval2!=0:
 					ouch=1
-					warn("Couldn't umount bind mount: "+mypath+x)
+					warn("Couldn't umount bind mount: " + mypath + self.mountmap[x])
 
 			if "SNAPCACHE" in self.settings and x == "/usr/portage":
 				try:


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     7e37dc04cadec0722eb692511084750b60c93f90
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 22 04:51:13 2013 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:21 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=7e37dc04

modules/generic_stage_target.py: Use 'distdir' instead of hard-coding '${PORTAGE}/distfiles'

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 0803a8c..fc54fbf 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -1065,7 +1065,7 @@ class generic_stage_target(generic_target):
 					print "\tpackage.use in the profile and portage_confdir. You've been warned!"
 
 			myf.write('PORTDIR="%s"\n' % self.settings['portdir'])
-			myf.write('DISTDIR="${PORTDIR}/distfiles"\n')
+			myf.write('DISTDIR="%s"\n' % self.settings['distdir'])
 			myf.write('PKGDIR="${PORTDIR}/packages"\n')
 
 			""" Setup the portage overlay """


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     df33334be1da8e1605e2e28887a6f9bb4bd5cb6e
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  8 07:17:22 2013 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:00 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=df33334b

modules/tinderbox_target.py: Use 'portdir' instead of hard-coding '/usr/portage'

W. Trevor King: Refactored Git history for Brian Dolbec's content
changes with additional whitespace cleanups.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/tinderbox_target.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/tinderbox_target.py b/modules/tinderbox_target.py
index 46fe082..ca55610 100644
--- a/modules/tinderbox_target.py
+++ b/modules/tinderbox_target.py
@@ -29,8 +29,12 @@ class tinderbox_target(generic_stage_target):
 			raise CatalystError,"Tinderbox aborting due to error."
 
 	def set_cleanables(self):
-	    self.settings["cleanables"]=["/etc/resolv.conf","/var/tmp/*","/root/*",\
-					"/usr/portage"]
+		self.settings['cleanables'] = [
+			'/etc/resolv.conf',
+			'/var/tmp/*',
+			'/root/*',
+			self.settings['portdir'],
+			]
 
 	def set_action_sequence(self):
 		#Default action sequence for run method


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-12-15  4:19 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-12-15  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     27b751ffd9594e0128a3d70f83c7af18dab03838
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 02:56:04 2012 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 04:17:16 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=27b751ff

modules/generic_stage_target.py: Use 'portdir' instead of hard-coding '/usr/portage'

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: W. Trevor King <wking <AT> tremily.us>
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

---
 modules/generic_stage_target.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 848aca2..0871cba 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -406,7 +406,7 @@ class generic_stage_target(generic_target):
 
 	def set_cleanables(self):
 		self.settings["cleanables"]=["/etc/resolv.conf","/var/tmp/*","/tmp/*",\
-			"/root/*","/usr/portage"]
+			"/root/*", self.settings["portdir"]]
 
 	def set_snapshot_path(self):
 		self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
@@ -785,7 +785,7 @@ class generic_stage_target(generic_target):
 				print "Valid snapshot cache, skipping unpack of portage tree..."
 				unpack=False
 		else:
-			destdir=normpath(self.settings["chroot_path"]+"/usr/portage")
+			destdir = normpath(self.settings["chroot_path"] + self.settings["portdir"])
 			cleanup_errmsg="Error removing existing snapshot directory."
 			cleanup_msg=\
 				"Cleaning up existing portage tree (This can take a long time)..."
@@ -799,7 +799,7 @@ class generic_stage_target(generic_target):
 
 			if "AUTORESUME" in self.settings \
 				and os.path.exists(self.settings["chroot_path"]+\
-					"/usr/portage/") \
+					self.settings["portdir"]) \
 				and os.path.exists(self.settings["autoresume_path"]\
 					+"unpack_portage") \
 				and self.settings["snapshot_path_hash"] == snapshot_hash:
@@ -846,7 +846,7 @@ class generic_stage_target(generic_target):
 			cmd("rm -f "+self.settings["chroot_path"]+"/etc/portage/make.profile",\
 					"Error zapping profile link",env=self.env)
 			cmd("mkdir -p "+self.settings["chroot_path"]+"/etc/portage/")
-			cmd("ln -sf ../../usr/portage/profiles/"+\
+			cmd("ln -sf ../.." + self.settings["portdir"] + "/profiles/" + \
 				self.settings["target_profile"]+" "+\
 				self.settings["chroot_path"]+"/etc/portage/make.profile",\
 				"Error creating profile link",env=self.env)


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-08-08  5:38 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-08-08  5:38 UTC (permalink / raw
  To: gentoo-commits

commit:     c52962b6bd2e12dec9fdaea6592d39bedce0a752
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 31 04:46:48 2013 +0000
Commit:     Matt Turner <mattst88 <AT> gmail <DOT> com>
CommitDate: Thu Aug  8 02:31:00 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=c52962b6

generic_stage_target: default {PORT,PKG,DIST}DIR

This provides forward compatiblity so that stage builds do not break
in the future when portage changes the default PORTDIR, PKGDIR, and
DISTDIR locations (bug #378603).

Also, it provides backward compatibility for various tools that require
PORTDIR to be defined in make.conf, such as the following:

	gentoo-bashcomp - bug #478444
	euse - bug #474574
	euses and ufed - bug #478318

X-Gentoo-Bug: 479062
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=479062
Reviewed-by: Matt Turner <mattst88 <AT> gmail.com>

---
 modules/generic_stage_target.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 8f3c05a..848aca2 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -1064,6 +1064,10 @@ class generic_stage_target(generic_target):
 						"/use will cause portage to ignore"
 					print "\tpackage.use in the profile and portage_confdir. You've been warned!"
 
+			myf.write('PORTDIR="/usr/portage"\n')
+			myf.write('DISTDIR="${PORTDIR}/distfiles"\n')
+			myf.write('PKGDIR="${PORTDIR}/packages"\n')
+
 			""" Setup the portage overlay """
 			if "portage_overlay" in self.settings:
 				myf.write('PORTDIR_OVERLAY="/usr/local/portage"\n')


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-08-02  5:59 Brian Dolbec
  0 siblings, 0 replies; 44+ messages in thread
From: Brian Dolbec @ 2013-08-02  5:59 UTC (permalink / raw
  To: gentoo-commits

commit:     1082b4471613842494261d74ec2598b4191056c9
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  2 05:59:10 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Aug  2 05:59:10 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=1082b447

Fix incorrect type for livecd/modblacklist.

Bug reported by tstellar.

---
 modules/livecd_stage2_target.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/livecd_stage2_target.py b/modules/livecd_stage2_target.py
index f816b21..5be8fd2 100644
--- a/modules/livecd_stage2_target.py
+++ b/modules/livecd_stage2_target.py
@@ -68,6 +68,9 @@ class livecd_stage2_target(generic_stage_target):
 				raise CatalystError,"Couldn't open "+self.settings["chroot_path"]+"/etc/modprobe.d/blacklist.conf."
 
 			myf.write("\n#Added by Catalyst:")
+			# workaround until config.py is using configparser
+			if isinstance(self.settings["livecd/modblacklist"], str):
+				self.settings["livecd/modblacklist"] = self.settings["livecd/modblacklist"].split()
 			for x in self.settings["livecd/modblacklist"]:
 				myf.write("\nblacklist "+x)
 			myf.close()


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-05-27 20:26 Richard Farina
  0 siblings, 0 replies; 44+ messages in thread
From: Richard Farina @ 2013-05-27 20:26 UTC (permalink / raw
  To: gentoo-commits

commit:     12f082c64a1720ac1e82e91ed6e3a0a452afa4aa
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Mon May 27 20:23:12 2013 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Mon May 27 20:23:12 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=12f082c6

Revert "use lbzip2 to unpack the stages"

This reverts commit 978c02e6fa04ab7ed1a40003fa0eb4cfce952ca2, missed a
test

---
 modules/generic_stage_target.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index a9cc68e..31cb025 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -657,7 +657,7 @@ class generic_stage_target(generic_target):
 					unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				else:
-					unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+					unpack_cmd="tar xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				error_msg="Tarball extraction of "+\
 					self.settings["source_path"]+" to "+\
@@ -672,7 +672,7 @@ class generic_stage_target(generic_target):
 				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			else:
-				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+				unpack_cmd="tar xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			error_msg="Tarball extraction of "+self.settings["source_path"]+\
 				" to "+self.settings["chroot_path"]+" failed."
@@ -773,7 +773,7 @@ class generic_stage_target(generic_target):
 			if "bz2" == self.settings["chroot_path"][-3:]:
 				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			else:
-				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
+				unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			unpack_errmsg="Error unpacking snapshot"
 			cleanup_msg="Cleaning up invalid snapshot cache at \n\t"+\
 				self.settings["snapshot_cache_path"]+\
@@ -793,7 +793,7 @@ class generic_stage_target(generic_target):
 				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			else:
-				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
+				unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			unpack_errmsg="Error unpacking snapshot"
 


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-05-27 20:26 Richard Farina
  0 siblings, 0 replies; 44+ messages in thread
From: Richard Farina @ 2013-05-27 20:26 UTC (permalink / raw
  To: gentoo-commits

commit:     cf83c489c031e1ea5741060d8fd3117a9715f0f4
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Mon May 27 20:25:03 2013 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Mon May 27 20:25:03 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=cf83c489

proper lbzip2 decompression of stages

use lbzip2 to decompress stages ONLY, snapshots can be bz2 or xz.
This provides me a 6x increase and likely more if you have fast IO

---
 modules/generic_stage_target.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 31cb025..8f3c05a 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -657,7 +657,7 @@ class generic_stage_target(generic_target):
 					unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				else:
-					unpack_cmd="tar xpf "+self.settings["source_path"]+" -C "+\
+					unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				error_msg="Tarball extraction of "+\
 					self.settings["source_path"]+" to "+\
@@ -672,7 +672,7 @@ class generic_stage_target(generic_target):
 				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			else:
-				unpack_cmd="tar xpf "+self.settings["source_path"]+" -C "+\
+				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			error_msg="Tarball extraction of "+self.settings["source_path"]+\
 				" to "+self.settings["chroot_path"]+" failed."


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-05-27 20:15 Richard Farina
  0 siblings, 0 replies; 44+ messages in thread
From: Richard Farina @ 2013-05-27 20:15 UTC (permalink / raw
  To: gentoo-commits

commit:     978c02e6fa04ab7ed1a40003fa0eb4cfce952ca2
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Mon May 27 20:13:28 2013 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Mon May 27 20:13:28 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=978c02e6

use lbzip2 to unpack the stages

Since we already use lbzip2 to compress everthing,
it makes a significant performance difference to
also unpack the stages using lbzip2.  When the stage
compression is selectable this should be enhanced to use
other decompressors as well (although xz doesn't seem to
need a multi-threaded decompressor).

---
 modules/generic_stage_target.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 31cb025..a9cc68e 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -657,7 +657,7 @@ class generic_stage_target(generic_target):
 					unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				else:
-					unpack_cmd="tar xpf "+self.settings["source_path"]+" -C "+\
+					unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				error_msg="Tarball extraction of "+\
 					self.settings["source_path"]+" to "+\
@@ -672,7 +672,7 @@ class generic_stage_target(generic_target):
 				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			else:
-				unpack_cmd="tar xpf "+self.settings["source_path"]+" -C "+\
+				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			error_msg="Tarball extraction of "+self.settings["source_path"]+\
 				" to "+self.settings["chroot_path"]+" failed."
@@ -773,7 +773,7 @@ class generic_stage_target(generic_target):
 			if "bz2" == self.settings["chroot_path"][-3:]:
 				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			else:
-				unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+destdir
+				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			unpack_errmsg="Error unpacking snapshot"
 			cleanup_msg="Cleaning up invalid snapshot cache at \n\t"+\
 				self.settings["snapshot_cache_path"]+\
@@ -793,7 +793,7 @@ class generic_stage_target(generic_target):
 				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			else:
-				unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+\
+				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			unpack_errmsg="Error unpacking snapshot"
 


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-02-23  2:02 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-02-23  2:02 UTC (permalink / raw
  To: gentoo-commits

commit:     78ef6501495eff12cb9c121a7b90ab90be0cd83a
Author:     W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Sat Feb  9 20:45:34 2013 +0000
Commit:     Matt Turner <mattst88 <AT> gmail <DOT> com>
CommitDate: Sat Feb 23 02:02:15 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=78ef6501

generic_stage_target: Split ._copy_kernel_config() from ._build_kernel()

_copy_kernel_config() is one idea with a bunch of error handling.
Isolating it in its own function makes _build_kernel() easier to read.

Reviewed-by: Matt Turner <mattst88 <AT> gmail.com>

---
 modules/generic_stage_target.py |   49 ++++++++++++++++++++------------------
 1 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index af7cbe7..2c32c00 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -1426,29 +1426,7 @@ class generic_stage_target(generic_target):
 				+"build_kernel_"+kname):
 			print "Resume point detected, skipping build_kernel for "+kname+" operation..."
 		else: # TODO: make this not require a kernel config
-			try:
-				if not os.path.exists(self.settings["boot/kernel/"+kname+"/config"]):
-					self.unbind()
-					raise CatalystError,\
-						"Can't find kernel config: "+\
-						self.settings["boot/kernel/"+kname+\
-						"/config"]
-
-			except TypeError:
-				raise CatalystError,\
-					"Required value boot/kernel/config not specified"
-
-			try:
-				cmd("cp "+self.settings["boot/kernel/"+kname+\
-					"/config"]+" "+\
-					self.settings["chroot_path"]+"/var/tmp/"+\
-					kname+".config",\
-					"Couldn't copy kernel config: "+\
-					self.settings["boot/kernel/"+kname+\
-					"/config"],env=self.env)
-
-			except CatalystError:
-				self.unbind()
+			self._copy_kernel_config(kname=kname)
 
 			"""
 			If we need to pass special options to the bootloader
@@ -1516,6 +1494,31 @@ class generic_stage_target(generic_target):
 				" post-kmerge ",
 				"Runscript post-kmerge failed",env=self.env)
 
+	def _copy_kernel_config(self, kname):
+		try:
+			if not os.path.exists(self.settings["boot/kernel/"+kname+"/config"]):
+				self.unbind()
+				raise CatalystError,\
+					"Can't find kernel config: "+\
+					self.settings["boot/kernel/"+kname+\
+					"/config"]
+
+		except TypeError:
+			raise CatalystError,\
+				"Required value boot/kernel/config not specified"
+
+		try:
+			cmd("cp "+self.settings["boot/kernel/"+kname+\
+				"/config"]+" "+\
+				self.settings["chroot_path"]+"/var/tmp/"+\
+				kname+".config",\
+				"Couldn't copy kernel config: "+\
+				self.settings["boot/kernel/"+kname+\
+				"/config"],env=self.env)
+
+		except CatalystError:
+			self.unbind()
+
 	def bootloader(self):
 		if "AUTORESUME" in self.settings \
 			and os.path.exists(self.settings["autoresume_path"]+"bootloader"):


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-02-23  2:02 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-02-23  2:02 UTC (permalink / raw
  To: gentoo-commits

commit:     d2edff3599ac66053f1c801e090009278a82eaea
Author:     W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Sat Feb  9 20:45:37 2013 +0000
Commit:     Matt Turner <mattst88 <AT> gmail <DOT> com>
CommitDate: Sat Feb 23 02:02:15 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=d2edff35

generic_stage_target: Handle unspecified boot/kernel/<kname>/config

If boot/kernel/<kname>/config is not set, make _copy_kernel_config a
no-op.

Reviewed-by: Matt Turner <mattst88 <AT> gmail.com>

---
 modules/generic_stage_target.py |   27 +++++++++++----------------
 1 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index e741fcd..31cb025 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -1426,7 +1426,6 @@ class generic_stage_target(generic_target):
 				+"build_kernel_"+kname):
 			print "Resume point detected, skipping build_kernel for "+kname+" operation..."
 			return
-		# TODO: make this not require a kernel config
 		self._copy_kernel_config(kname=kname)
 
 		"""
@@ -1478,7 +1477,7 @@ class generic_stage_target(generic_target):
 			"Runscript post-kmerge failed",env=self.env)
 
 	def _copy_kernel_config(self, kname):
-		try:
+		if "boot/kernel/"+kname+"/config" in self.settings:
 			if not os.path.exists(self.settings["boot/kernel/"+kname+"/config"]):
 				self.unbind()
 				raise CatalystError,\
@@ -1486,21 +1485,17 @@ class generic_stage_target(generic_target):
 					self.settings["boot/kernel/"+kname+\
 					"/config"]
 
-		except TypeError:
-			raise CatalystError,\
-				"Required value boot/kernel/config not specified"
+			try:
+				cmd("cp "+self.settings["boot/kernel/"+kname+\
+					"/config"]+" "+\
+					self.settings["chroot_path"]+"/var/tmp/"+\
+					kname+".config",\
+					"Couldn't copy kernel config: "+\
+					self.settings["boot/kernel/"+kname+\
+					"/config"],env=self.env)
 
-		try:
-			cmd("cp "+self.settings["boot/kernel/"+kname+\
-				"/config"]+" "+\
-				self.settings["chroot_path"]+"/var/tmp/"+\
-				kname+".config",\
-				"Couldn't copy kernel config: "+\
-				self.settings["boot/kernel/"+kname+\
-				"/config"],env=self.env)
-
-		except CatalystError:
-			self.unbind()
+			except CatalystError:
+				self.unbind()
 
 	def _copy_initramfs_overlay(self, kname):
 		if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-02-23  2:02 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-02-23  2:02 UTC (permalink / raw
  To: gentoo-commits

commit:     a1c561ae8fb636e82a9c93863a74c1b423966527
Author:     W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Sat Feb  9 20:45:36 2013 +0000
Commit:     Matt Turner <mattst88 <AT> gmail <DOT> com>
CommitDate: Sat Feb 23 02:02:15 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=a1c561ae

generic_stage_target: Split ._copy_initramfs_overlay() from ._build_kernel()

_copy_initramfs_overlay() is long enough that it makes reading
_build_kernel() difficult.

Reviewed-by: Matt Turner <mattst88 <AT> gmail.com>

---
 modules/generic_stage_target.py |   41 ++++++++++++++++++++------------------
 1 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 337ab16..e741fcd 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -1452,25 +1452,7 @@ class generic_stage_target(generic_target):
 			self.settings["boot/kernel/"+kname+\
 			"/extraversion"]
 
-		if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:
-			if os.path.exists(self.settings["boot/kernel/"+\
-				kname+"/initramfs_overlay"]):
-				print "Copying initramfs_overlay dir "+\
-					self.settings["boot/kernel/"+kname+\
-					"/initramfs_overlay"]
-
-				cmd("mkdir -p "+\
-					self.settings["chroot_path"]+\
-					"/tmp/initramfs_overlay/"+\
-					self.settings["boot/kernel/"+kname+\
-					"/initramfs_overlay"],env=self.env)
-
-				cmd("cp -R "+self.settings["boot/kernel/"+\
-					kname+"/initramfs_overlay"]+"/* "+\
-					self.settings["chroot_path"]+\
-					"/tmp/initramfs_overlay/"+\
-					self.settings["boot/kernel/"+kname+\
-					"/initramfs_overlay"],env=self.env)
+		self._copy_initramfs_overlay(kname=kname)
 
 		""" Execute the script that builds the kernel """
 		cmd("/bin/bash "+self.settings["controller_file"]+\
@@ -1520,6 +1502,27 @@ class generic_stage_target(generic_target):
 		except CatalystError:
 			self.unbind()
 
+	def _copy_initramfs_overlay(self, kname):
+		if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:
+			if os.path.exists(self.settings["boot/kernel/"+\
+				kname+"/initramfs_overlay"]):
+				print "Copying initramfs_overlay dir "+\
+					self.settings["boot/kernel/"+kname+\
+					"/initramfs_overlay"]
+
+				cmd("mkdir -p "+\
+					self.settings["chroot_path"]+\
+					"/tmp/initramfs_overlay/"+\
+					self.settings["boot/kernel/"+kname+\
+					"/initramfs_overlay"],env=self.env)
+
+				cmd("cp -R "+self.settings["boot/kernel/"+\
+					kname+"/initramfs_overlay"]+"/* "+\
+					self.settings["chroot_path"]+\
+					"/tmp/initramfs_overlay/"+\
+					self.settings["boot/kernel/"+kname+\
+					"/initramfs_overlay"],env=self.env)
+
 	def bootloader(self):
 		if "AUTORESUME" in self.settings \
 			and os.path.exists(self.settings["autoresume_path"]+"bootloader"):


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-02-23  2:02 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-02-23  2:02 UTC (permalink / raw
  To: gentoo-commits

commit:     61f4dc33005f49566f93aac352c876c093438bf9
Author:     W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Sat Feb  9 20:45:35 2013 +0000
Commit:     Matt Turner <mattst88 <AT> gmail <DOT> com>
CommitDate: Sat Feb 23 02:02:15 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=61f4dc33

generic_stage_target.py: Dedent the bulk of ._build_kernel()

At the beginning of the function, we check for an autoresume point.
If we find it, just return.  This allows us to dedent the `else` block
that had been handling the no-autoresume-found case.

Reviewed-by: Matt Turner <mattst88 <AT> gmail.com>

---
 modules/generic_stage_target.py |  121 ++++++++++++++++++++-------------------
 1 files changed, 61 insertions(+), 60 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 2c32c00..337ab16 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -1425,74 +1425,75 @@ class generic_stage_target(generic_target):
 			and os.path.exists(self.settings["autoresume_path"]\
 				+"build_kernel_"+kname):
 			print "Resume point detected, skipping build_kernel for "+kname+" operation..."
-		else: # TODO: make this not require a kernel config
-			self._copy_kernel_config(kname=kname)
+			return
+		# TODO: make this not require a kernel config
+		self._copy_kernel_config(kname=kname)
 
-			"""
-			If we need to pass special options to the bootloader
-			for this kernel put them into the environment
-			"""
-			if "boot/kernel/"+kname+"/kernelopts" in self.settings:
-				myopts=self.settings["boot/kernel/"+kname+\
-					"/kernelopts"]
+		"""
+		If we need to pass special options to the bootloader
+		for this kernel put them into the environment
+		"""
+		if "boot/kernel/"+kname+"/kernelopts" in self.settings:
+			myopts=self.settings["boot/kernel/"+kname+\
+				"/kernelopts"]
 
-				if type(myopts) != types.StringType:
-					myopts = string.join(myopts)
-					self.env[kname+"_kernelopts"]=myopts
+			if type(myopts) != types.StringType:
+				myopts = string.join(myopts)
+				self.env[kname+"_kernelopts"]=myopts
 
-				else:
-					self.env[kname+"_kernelopts"]=""
+			else:
+				self.env[kname+"_kernelopts"]=""
 
-			if "boot/kernel/"+kname+"/extraversion" not in self.settings:
-				self.settings["boot/kernel/"+kname+\
-					"/extraversion"]=""
+		if "boot/kernel/"+kname+"/extraversion" not in self.settings:
+			self.settings["boot/kernel/"+kname+\
+				"/extraversion"]=""
 
-			self.env["clst_kextraversion"]=\
-				self.settings["boot/kernel/"+kname+\
-				"/extraversion"]
-
-			if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:
-				if os.path.exists(self.settings["boot/kernel/"+\
-					kname+"/initramfs_overlay"]):
-					print "Copying initramfs_overlay dir "+\
-						self.settings["boot/kernel/"+kname+\
-						"/initramfs_overlay"]
-
-					cmd("mkdir -p "+\
-						self.settings["chroot_path"]+\
-						"/tmp/initramfs_overlay/"+\
-						self.settings["boot/kernel/"+kname+\
-						"/initramfs_overlay"],env=self.env)
-
-					cmd("cp -R "+self.settings["boot/kernel/"+\
-						kname+"/initramfs_overlay"]+"/* "+\
-						self.settings["chroot_path"]+\
-						"/tmp/initramfs_overlay/"+\
-						self.settings["boot/kernel/"+kname+\
-						"/initramfs_overlay"],env=self.env)
-
-			""" Execute the script that builds the kernel """
-			cmd("/bin/bash "+self.settings["controller_file"]+\
-				" kernel "+kname,\
-				"Runscript kernel build failed",env=self.env)
+		self.env["clst_kextraversion"]=\
+			self.settings["boot/kernel/"+kname+\
+			"/extraversion"]
+
+		if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:
+			if os.path.exists(self.settings["boot/kernel/"+\
+				kname+"/initramfs_overlay"]):
+				print "Copying initramfs_overlay dir "+\
+					self.settings["boot/kernel/"+kname+\
+					"/initramfs_overlay"]
 
-			if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:
-				if os.path.exists(self.settings["chroot_path"]+\
-					"/tmp/initramfs_overlay/"):
-					print "Cleaning up temporary overlay dir"
-					cmd("rm -R "+self.settings["chroot_path"]+\
-						"/tmp/initramfs_overlay/",env=self.env)
+				cmd("mkdir -p "+\
+					self.settings["chroot_path"]+\
+					"/tmp/initramfs_overlay/"+\
+					self.settings["boot/kernel/"+kname+\
+					"/initramfs_overlay"],env=self.env)
 
-			touch(self.settings["autoresume_path"]+\
-				"build_kernel_"+kname)
+				cmd("cp -R "+self.settings["boot/kernel/"+\
+					kname+"/initramfs_overlay"]+"/* "+\
+					self.settings["chroot_path"]+\
+					"/tmp/initramfs_overlay/"+\
+					self.settings["boot/kernel/"+kname+\
+					"/initramfs_overlay"],env=self.env)
 
-			"""
-			Execute the script that cleans up the kernel build
-			environment
-			"""
-			cmd("/bin/bash "+self.settings["controller_file"]+\
-				" post-kmerge ",
-				"Runscript post-kmerge failed",env=self.env)
+		""" Execute the script that builds the kernel """
+		cmd("/bin/bash "+self.settings["controller_file"]+\
+			" kernel "+kname,\
+			"Runscript kernel build failed",env=self.env)
+
+		if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:
+			if os.path.exists(self.settings["chroot_path"]+\
+				"/tmp/initramfs_overlay/"):
+				print "Cleaning up temporary overlay dir"
+				cmd("rm -R "+self.settings["chroot_path"]+\
+					"/tmp/initramfs_overlay/",env=self.env)
+
+		touch(self.settings["autoresume_path"]+\
+			"build_kernel_"+kname)
+
+		"""
+		Execute the script that cleans up the kernel build
+		environment
+		"""
+		cmd("/bin/bash "+self.settings["controller_file"]+\
+			" post-kmerge ",
+			"Runscript post-kmerge failed",env=self.env)
 
 	def _copy_kernel_config(self, kname):
 		try:


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-02-23  2:02 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-02-23  2:02 UTC (permalink / raw
  To: gentoo-commits

commit:     62a252d096182147169f397f7bbea8330dfe3e1a
Author:     W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Sat Feb  9 20:45:33 2013 +0000
Commit:     Matt Turner <mattst88 <AT> gmail <DOT> com>
CommitDate: Sat Feb 23 02:02:15 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=62a252d0

generic_stage_target: Split ._build_kernel() out of .build_kernel()

The indentation was getting too deep ;).  This also makes the
single-kernel-building code more digestible, by removing the
multiple-kernel looping and error handling from the function you're
reading.

Reviewed-by: Matt Turner <mattst88 <AT> gmail.com>

---
 modules/generic_stage_target.py |  196 ++++++++++++++++++++-------------------
 1 files changed, 99 insertions(+), 97 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 952fa4b..af7cbe7 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -1395,6 +1395,7 @@ class generic_stage_target(generic_target):
 							"build aborting due to error."
 
 	def build_kernel(self):
+		"Build all configured kernels"
 		if "AUTORESUME" in self.settings \
 			and os.path.exists(self.settings["autoresume_path"]+"build_kernel"):
 			print "Resume point detected, skipping build_kernel operation..."
@@ -1410,110 +1411,111 @@ class generic_stage_target(generic_target):
 					cmd("/bin/bash "+self.settings["controller_file"]+\
 						" pre-kmerge ","Runscript pre-kmerge failed",\
 						env=self.env)
-
 					for kname in mynames:
-						if "AUTORESUME" in self.settings \
-							and os.path.exists(self.settings["autoresume_path"]\
-								+"build_kernel_"+kname):
-							print "Resume point detected, skipping build_kernel for "+kname+" operation..."
-						else: # TODO: make this not require a kernel config
-							try:
-								if not os.path.exists(self.settings["boot/kernel/"+kname+"/config"]):
-									self.unbind()
-									raise CatalystError,\
-										"Can't find kernel config: "+\
-										self.settings["boot/kernel/"+kname+\
-										"/config"]
-
-							except TypeError:
-								raise CatalystError,\
-									"Required value boot/kernel/config not specified"
-
-							try:
-								cmd("cp "+self.settings["boot/kernel/"+kname+\
-									"/config"]+" "+\
-									self.settings["chroot_path"]+"/var/tmp/"+\
-									kname+".config",\
-									"Couldn't copy kernel config: "+\
-									self.settings["boot/kernel/"+kname+\
-									"/config"],env=self.env)
-
-							except CatalystError:
-								self.unbind()
-
-							"""
-							If we need to pass special options to the bootloader
-							for this kernel put them into the environment
-							"""
-							if "boot/kernel/"+kname+"/kernelopts" in self.settings:
-								myopts=self.settings["boot/kernel/"+kname+\
-									"/kernelopts"]
-
-								if type(myopts) != types.StringType:
-									myopts = string.join(myopts)
-									self.env[kname+"_kernelopts"]=myopts
-
-								else:
-									self.env[kname+"_kernelopts"]=""
-
-							if "boot/kernel/"+kname+"/extraversion" not in self.settings:
-								self.settings["boot/kernel/"+kname+\
-									"/extraversion"]=""
-
-							self.env["clst_kextraversion"]=\
-								self.settings["boot/kernel/"+kname+\
-								"/extraversion"]
-
-							if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:
-								if os.path.exists(self.settings["boot/kernel/"+\
-									kname+"/initramfs_overlay"]):
-									print "Copying initramfs_overlay dir "+\
-										self.settings["boot/kernel/"+kname+\
-										"/initramfs_overlay"]
-
-									cmd("mkdir -p "+\
-										self.settings["chroot_path"]+\
-										"/tmp/initramfs_overlay/"+\
-										self.settings["boot/kernel/"+kname+\
-										"/initramfs_overlay"],env=self.env)
-
-									cmd("cp -R "+self.settings["boot/kernel/"+\
-										kname+"/initramfs_overlay"]+"/* "+\
-										self.settings["chroot_path"]+\
-										"/tmp/initramfs_overlay/"+\
-										self.settings["boot/kernel/"+kname+\
-										"/initramfs_overlay"],env=self.env)
-
-							""" Execute the script that builds the kernel """
-							cmd("/bin/bash "+self.settings["controller_file"]+\
-								" kernel "+kname,\
-								"Runscript kernel build failed",env=self.env)
-
-							if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:
-								if os.path.exists(self.settings["chroot_path"]+\
-									"/tmp/initramfs_overlay/"):
-									print "Cleaning up temporary overlay dir"
-									cmd("rm -R "+self.settings["chroot_path"]+\
-										"/tmp/initramfs_overlay/",env=self.env)
-
-							touch(self.settings["autoresume_path"]+\
-								"build_kernel_"+kname)
-
-							"""
-							Execute the script that cleans up the kernel build
-							environment
-							"""
-							cmd("/bin/bash "+self.settings["controller_file"]+\
-								" post-kmerge ",
-								"Runscript post-kmerge failed",env=self.env)
-
+						self._build_kernel(kname=kname)
 					touch(self.settings["autoresume_path"]+"build_kernel")
-
 				except CatalystError:
 					self.unbind()
 					raise CatalystError,\
 						"build aborting due to kernel build error."
 
+	def _build_kernel(self, kname):
+		"Build a single configured kernel by name"
+		if "AUTORESUME" in self.settings \
+			and os.path.exists(self.settings["autoresume_path"]\
+				+"build_kernel_"+kname):
+			print "Resume point detected, skipping build_kernel for "+kname+" operation..."
+		else: # TODO: make this not require a kernel config
+			try:
+				if not os.path.exists(self.settings["boot/kernel/"+kname+"/config"]):
+					self.unbind()
+					raise CatalystError,\
+						"Can't find kernel config: "+\
+						self.settings["boot/kernel/"+kname+\
+						"/config"]
+
+			except TypeError:
+				raise CatalystError,\
+					"Required value boot/kernel/config not specified"
+
+			try:
+				cmd("cp "+self.settings["boot/kernel/"+kname+\
+					"/config"]+" "+\
+					self.settings["chroot_path"]+"/var/tmp/"+\
+					kname+".config",\
+					"Couldn't copy kernel config: "+\
+					self.settings["boot/kernel/"+kname+\
+					"/config"],env=self.env)
+
+			except CatalystError:
+				self.unbind()
+
+			"""
+			If we need to pass special options to the bootloader
+			for this kernel put them into the environment
+			"""
+			if "boot/kernel/"+kname+"/kernelopts" in self.settings:
+				myopts=self.settings["boot/kernel/"+kname+\
+					"/kernelopts"]
+
+				if type(myopts) != types.StringType:
+					myopts = string.join(myopts)
+					self.env[kname+"_kernelopts"]=myopts
+
+				else:
+					self.env[kname+"_kernelopts"]=""
+
+			if "boot/kernel/"+kname+"/extraversion" not in self.settings:
+				self.settings["boot/kernel/"+kname+\
+					"/extraversion"]=""
+
+			self.env["clst_kextraversion"]=\
+				self.settings["boot/kernel/"+kname+\
+				"/extraversion"]
+
+			if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:
+				if os.path.exists(self.settings["boot/kernel/"+\
+					kname+"/initramfs_overlay"]):
+					print "Copying initramfs_overlay dir "+\
+						self.settings["boot/kernel/"+kname+\
+						"/initramfs_overlay"]
+
+					cmd("mkdir -p "+\
+						self.settings["chroot_path"]+\
+						"/tmp/initramfs_overlay/"+\
+						self.settings["boot/kernel/"+kname+\
+						"/initramfs_overlay"],env=self.env)
+
+					cmd("cp -R "+self.settings["boot/kernel/"+\
+						kname+"/initramfs_overlay"]+"/* "+\
+						self.settings["chroot_path"]+\
+						"/tmp/initramfs_overlay/"+\
+						self.settings["boot/kernel/"+kname+\
+						"/initramfs_overlay"],env=self.env)
+
+			""" Execute the script that builds the kernel """
+			cmd("/bin/bash "+self.settings["controller_file"]+\
+				" kernel "+kname,\
+				"Runscript kernel build failed",env=self.env)
+
+			if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:
+				if os.path.exists(self.settings["chroot_path"]+\
+					"/tmp/initramfs_overlay/"):
+					print "Cleaning up temporary overlay dir"
+					cmd("rm -R "+self.settings["chroot_path"]+\
+						"/tmp/initramfs_overlay/",env=self.env)
+
+			touch(self.settings["autoresume_path"]+\
+				"build_kernel_"+kname)
+
+			"""
+			Execute the script that cleans up the kernel build
+			environment
+			"""
+			cmd("/bin/bash "+self.settings["controller_file"]+\
+				" post-kmerge ",
+				"Runscript post-kmerge failed",env=self.env)
+
 	def bootloader(self):
 		if "AUTORESUME" in self.settings \
 			and os.path.exists(self.settings["autoresume_path"]+"bootloader"):


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2013-02-05  8:34 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2013-02-05  8:34 UTC (permalink / raw
  To: gentoo-commits

commit:     366009cf6a893ab44c98ff7e7a08b8130d24e98a
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  5 08:31:09 2013 +0000
Commit:     Matt Turner <mattst88 <AT> gmail <DOT> com>
CommitDate: Tue Feb  5 08:34:02 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=366009cf

Make sure shutil.rmtree() isn't passed a symlink

Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=455022
Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>

---
 modules/generic_stage_target.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 12921d6..952fa4b 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -1143,7 +1143,7 @@ class generic_stage_target(generic_target):
 						"/empty"].split()
 				for x in self.settings[self.settings["spec_prefix"]+"/empty"]:
 					myemp=self.settings["destpath"]+x
-					if not os.path.isdir(myemp):
+					if not os.path.isdir(myemp) or os.path.islink(myemp):
 						print x,"not a directory or does not exist, skipping 'empty' operation."
 						continue
 					print "Emptying directory",x


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2012-11-22  2:51 Jorge Manuel B. S. Vicetto
  0 siblings, 0 replies; 44+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2012-11-22  2:51 UTC (permalink / raw
  To: gentoo-commits

commit:     9cb44ec10cf3004f8038b6e8bd4a0fb015a2e0b4
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 22 02:48:01 2012 +0000
Commit:     Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Thu Nov 22 02:49:31 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=9cb44ec1

Make sure we always append bindist use flag to all targets.

---
 modules/generic_stage_target.py |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 578c4af..3597680 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -485,10 +485,13 @@ class generic_stage_target(generic_target):
 			self.settings["use"]=\
 				self.settings[self.settings["spec_prefix"]+"/use"]
 			del self.settings[self.settings["spec_prefix"]+"/use"]
-		if self.settings.has_key("use"):
-			if type(self.settings["use"])==types.StringType:
-				self.settings["use"]=self.settings["use"].split()
-				self.settings["use"].append("bindist")
+		if not self.settings.has_key("use"):
+			self.settings["use"]=""
+		if type(self.settings["use"])==types.StringType:
+			self.settings["use"]=self.settings["use"].split()
+
+		# Force bindist for all targets
+		self.settings["use"].append("bindist")
 
 	def set_stage_path(self):
 		self.settings["stage_path"]=normpath(self.settings["chroot_path"])


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2012-11-22  2:51 Jorge Manuel B. S. Vicetto
  0 siblings, 0 replies; 44+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2012-11-22  2:51 UTC (permalink / raw
  To: gentoo-commits

commit:     1f604c892da5e0d382976900f16b5f6a5fd51025
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 21 01:08:28 2012 +0000
Commit:     Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Thu Nov 22 02:49:31 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=1f604c89

Clean-up the dirs we remove on stage1 target (stop cleaning old non-existant python dirs).

---
 modules/stage1_target.py |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/modules/stage1_target.py b/modules/stage1_target.py
index 0a93c88..9f0bff4 100644
--- a/modules/stage1_target.py
+++ b/modules/stage1_target.py
@@ -29,12 +29,7 @@ class stage1_target(generic_stage_target):
 	def set_cleanables(self):
 		generic_stage_target.set_cleanables(self)
 		self.settings["cleanables"].extend([\
-		"/usr/lib/python2.2/test", "/usr/lib/python2.2/email",\
-		"/usr/lib/python2.2/lib-tk", "/usr/lib/python2.3/test",\
-		"/usr/lib/python2.3/email", "/usr/lib/python2.3/lib-tk",\
-		"/usr/lib/python2.4/test", "/usr/lib/python2.4/email",\
-		"/usr/lib/python2.4/lib-tk", "/usr/share/zoneinfo",\
-		"/etc/portage/*"])
+		"/usr/share/zoneinfo", "/etc/portage/package*"])
 
 	# XXX: How do these override_foo() functions differ from the ones in generic_stage_target and why aren't they in stage3_target?
 


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2012-11-01 20:04 Richard Farina
  0 siblings, 0 replies; 44+ messages in thread
From: Richard Farina @ 2012-11-01 20:04 UTC (permalink / raw
  To: gentoo-commits

commit:     541150a7fd4f8f71adb9b015e9d41cfd97998203
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Thu Nov  1 20:05:37 2012 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Thu Nov  1 20:05:37 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=541150a7

prevent creating pointless "tmpfs" dir

It seems we are automatically creating the src dir we are trying to mount,
although that whole idea is a little wierd, for now I'll just prevent it
from doing that when mounting a tmpfs.

---
 modules/generic_stage_target.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 450d0fa..578c4af 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -895,7 +895,8 @@ class generic_stage_target(generic_target):
 				os.makedirs(self.settings["chroot_path"]+x,0755)
 
 			if not os.path.exists(self.mountmap[x]):
-				os.makedirs(self.mountmap[x],0755)
+				if not self.mountmap[x] == "tmpfs":
+					os.makedirs(self.mountmap[x],0755)
 
 			src=self.mountmap[x]
 			if self.settings.has_key("SNAPCACHE") and x == "/usr/portage":


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2012-10-29 20:36 Anthony G. Basile
  0 siblings, 0 replies; 44+ messages in thread
From: Anthony G. Basile @ 2012-10-29 20:36 UTC (permalink / raw
  To: gentoo-commits

commit:     ef5b53925f4cfa578c4f659840213a46e6d43ef1
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 29 20:30:51 2012 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Oct 29 20:36:32 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=ef5b5392

Do not break autopoint by cleaning out /usr/share/gettext in stage1

The problem comes in stage3 when you have packages that inherit autotools.eclass.
The eclass may make use of gettext and run autopoint which will fail if it doesn't
find  /usr/share/gettext/archive.dir.tar.gz.

X-Gentoo-Bug: 439636
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439636
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

---
 modules/stage1_target.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/stage1_target.py b/modules/stage1_target.py
index b97bd89..0a93c88 100644
--- a/modules/stage1_target.py
+++ b/modules/stage1_target.py
@@ -28,7 +28,7 @@ class stage1_target(generic_stage_target):
 
 	def set_cleanables(self):
 		generic_stage_target.set_cleanables(self)
-		self.settings["cleanables"].extend(["/usr/share/gettext",\
+		self.settings["cleanables"].extend([\
 		"/usr/lib/python2.2/test", "/usr/lib/python2.2/email",\
 		"/usr/lib/python2.2/lib-tk", "/usr/lib/python2.3/test",\
 		"/usr/lib/python2.3/email", "/usr/lib/python2.3/lib-tk",\


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2012-10-29 20:35 Anthony G. Basile
  0 siblings, 0 replies; 44+ messages in thread
From: Anthony G. Basile @ 2012-10-29 20:35 UTC (permalink / raw
  To: gentoo-commits

commit:     d647a08e7b0369c4479d9a8ada3c55ea047f165b
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 29 20:30:51 2012 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Oct 29 20:30:51 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=d647a08e

Do not break autopoint by cleaning out /usr/share/gettext in stage1

The problem comes in stage3 when you have packages that inherit autotools.eclass.
The eclass may make use of gettext and run autopoint which will fail if it doesn't
find  /usr/share/gettext/archive.dir.tar.gz.

X-Gentoo-Bug: 439636
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439636
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

The fix is to remove /usr/share/gettext from the list of stage1 cleanables.

---
 modules/stage1_target.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/stage1_target.py b/modules/stage1_target.py
index b97bd89..0a93c88 100644
--- a/modules/stage1_target.py
+++ b/modules/stage1_target.py
@@ -28,7 +28,7 @@ class stage1_target(generic_stage_target):
 
 	def set_cleanables(self):
 		generic_stage_target.set_cleanables(self)
-		self.settings["cleanables"].extend(["/usr/share/gettext",\
+		self.settings["cleanables"].extend([\
 		"/usr/lib/python2.2/test", "/usr/lib/python2.2/email",\
 		"/usr/lib/python2.2/lib-tk", "/usr/lib/python2.3/test",\
 		"/usr/lib/python2.3/email", "/usr/lib/python2.3/lib-tk",\


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2012-10-14  5:50 Matt Turner
  0 siblings, 0 replies; 44+ messages in thread
From: Matt Turner @ 2012-10-14  5:50 UTC (permalink / raw
  To: gentoo-commits

commit:     166a23995f9ca2356cfb2722df37f13c54bffcfd
Author:     Matt Turner <mattst88 <AT> gmail <DOT> com>
AuthorDate: Fri Sep 28 01:41:48 2012 +0000
Commit:     Matt Turner <mattst88 <AT> gmail <DOT> com>
CommitDate: Sun Oct 14 05:50:19 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=166a2399

Use lbzip2 for tar.bz2

---
 modules/catalyst_support.py     |    2 +-
 modules/generic_stage_target.py |    2 +-
 modules/snapshot_target.py      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py
index 5847d12..6dbcfb7 100644
--- a/modules/catalyst_support.py
+++ b/modules/catalyst_support.py
@@ -108,7 +108,7 @@ contents_map={
 	#"find"		:[calc_contents,"find %(path)s"],
 	"tar-tv":[calc_contents,"tar tvf %(file)s"],
 	"tar-tvz":[calc_contents,"tar tvzf %(file)s"],
-	"tar-tvj":[calc_contents,"tar tvjf %(file)s"],
+	"tar-tvj":[calc_contents,"tar -I lbzip2 -tvf %(file)s"],
 	"isoinfo-l":[calc_contents,"isoinfo -l -i %(file)s"],
 	# isoinfo-f should be a last resort only
 	"isoinfo-f":[calc_contents,"isoinfo -f -i %(file)s"],

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 2f93a73..eb5f490 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -1179,7 +1179,7 @@ class generic_stage_target(generic_target):
 
 			print "Creating stage tarball..."
 
-			cmd("tar cjpf "+self.settings["target_path"]+" -C "+\
+			cmd("tar -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
 				self.settings["stage_path"]+" .",\
 				"Couldn't create stage tarball",env=self.env)
 

diff --git a/modules/snapshot_target.py b/modules/snapshot_target.py
index bd96c98..81ab083 100644
--- a/modules/snapshot_target.py
+++ b/modules/snapshot_target.py
@@ -50,7 +50,7 @@ class snapshot_target(generic_stage_target):
 			self.settings["portdir"]+"/ "+mytmp+"/portage/","Snapshot failure",env=self.env)
 
 		print "Compressing Portage snapshot tarball..."
-		cmd("tar cjf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\
+		cmd("tar -I lbzip2 -cf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\
 			"Snapshot creation failure",env=self.env)
 
 		self.gen_contents_file(self.settings["snapshot_path"])


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2012-08-31  0:34 Jorge Manuel B. S. Vicetto
  0 siblings, 0 replies; 44+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2012-08-31  0:34 UTC (permalink / raw
  To: gentoo-commits

commit:     4f03fda74d686c142339add5323ab74c37e9748c
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 31 00:33:37 2012 +0000
Commit:     Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Fri Aug 31 00:34:25 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=4f03fda7

We want update_seed to be optional.

---
 modules/stage1_target.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/stage1_target.py b/modules/stage1_target.py
index f350ac7..876d2c3 100644
--- a/modules/stage1_target.py
+++ b/modules/stage1_target.py
@@ -98,7 +98,7 @@ class stage1_target(generic_stage_target):
 		self.mountmap["/tmp/stage1root/proc"]="/proc"
 
 	def set_update_seed(self):
-		if self.settings.has_key(self.settings["update_seed"]):
+		if self.settings.has_key("update_seed"):
 			self.settings["update_seed_cache"]=self.settings["update_seed"]
 
 def register(foo):


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2012-08-29  4:17 Jorge Manuel B. S. Vicetto
  0 siblings, 0 replies; 44+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2012-08-29  4:17 UTC (permalink / raw
  To: gentoo-commits

commit:     8f2d191829f29d20aecfaa0206daada35f437a4c
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 29 04:16:57 2012 +0000
Commit:     Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Wed Aug 29 04:16:57 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=8f2d1918

Fix whitespace \t != ' '

---
 modules/stage1_target.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/stage1_target.py b/modules/stage1_target.py
index 773e3c8..f350ac7 100644
--- a/modules/stage1_target.py
+++ b/modules/stage1_target.py
@@ -15,7 +15,7 @@ class stage1_target(generic_stage_target):
 		self.valid_values=["chost"]
 		self.valid_values.extend(["update_seed"])
 		generic_stage_target.__init__(self,spec,addlargs)
-        self.set_update_seed()
+		self.set_update_seed()
 	
 	def set_stage_path(self):
 		self.settings["stage_path"]=normpath(self.settings["chroot_path"]+self.settings["root_path"])


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2012-08-26 19:30 Jorge Manuel B. S. Vicetto
  0 siblings, 0 replies; 44+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2012-08-26 19:30 UTC (permalink / raw
  To: gentoo-commits

commit:     dc0d2984d5788e2a8e9e6024e9d62bdd5834c6d5
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 26 19:30:09 2012 +0000
Commit:     Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Sun Aug 26 19:30:09 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=dc0d2984

This patch adds in support for automatically detecting and decompressing
both formats gentoo currently ships portage snapshots in. To make the
change as minimal as possible I am using recent gnu/bsd tar ability to
automatically pick the correct format and decompress. This should work
on all gentoo supported platforms including linux, freebsd, and
prefix-macosx.

Signed-off-by: Rick Farina <sidhayn <AT> gmail.com>
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org>

---
 modules/generic_stage_target.py |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 24bf846..4bb51c2 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -404,12 +404,20 @@ class generic_stage_target(generic_target):
 
 	def set_snapshot_path(self):
 		self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
-			"/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2")
+			"/snapshots/portage-"+self.settings["snapshot"]+".tar.xz")
 
 		if os.path.exists(self.settings["snapshot_path"]):
 			self.settings["snapshot_path_hash"]=\
 				generate_hash(self.settings["snapshot_path"],\
 				hash_function=self.settings["hash_function"],verbose=False)
+		else:
+			self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
+				"/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2")
+
+			if os.path.exists(self.settings["snapshot_path"]):
+				self.settings["snapshot_path_hash"]=\
+					generate_hash(self.settings["snapshot_path"],\
+					hash_function=self.settings["hash_function"],verbose=False)
 
 	def set_snapcache_path(self):
 		if self.settings.has_key("SNAPCACHE"):
@@ -635,7 +643,7 @@ class generic_stage_target(generic_target):
 					self.settings["source_path"]+"\nto "+\
 					self.settings["chroot_path"]+\
 						" (This may take some time) ...\n"
-				unpack_cmd="tar xjpf "+self.settings["source_path"]+" -C "+\
+				unpack_cmd="tar xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 				error_msg="Tarball extraction of "+\
 					self.settings["source_path"]+" to "+\
@@ -646,7 +654,7 @@ class generic_stage_target(generic_target):
 				self.settings["source_path"]+"\nto "+\
 				self.settings["chroot_path"]+\
 				" (This may take some time) ...\n"
-			unpack_cmd="tar xjpf "+self.settings["source_path"]+" -C "+\
+			unpack_cmd="tar xpf "+self.settings["source_path"]+" -C "+\
 				self.settings["chroot_path"]
 			error_msg="Tarball extraction of "+self.settings["source_path"]+\
 				" to "+self.settings["chroot_path"]+" failed."
@@ -744,7 +752,7 @@ class generic_stage_target(generic_target):
 				read_from_clst(self.settings["snapshot_cache_path"]+\
 				"catalyst-hash")
 			destdir=self.settings["snapshot_cache_path"]
-			unpack_cmd="tar xjpf "+self.settings["snapshot_path"]+" -C "+destdir
+			unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			unpack_errmsg="Error unpacking snapshot"
 			cleanup_msg="Cleaning up invalid snapshot cache at \n\t"+\
 				self.settings["snapshot_cache_path"]+\
@@ -760,7 +768,7 @@ class generic_stage_target(generic_target):
 			cleanup_errmsg="Error removing existing snapshot directory."
 			cleanup_msg=\
 				"Cleaning up existing portage tree (This can take a long time)..."
-			unpack_cmd="tar xjpf "+self.settings["snapshot_path"]+" -C "+\
+			unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+\
 				self.settings["chroot_path"]+"/usr"
 			unpack_errmsg="Error unpacking snapshot"
 


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2012-08-23  5:55 Jorge Manuel B. S. Vicetto
  0 siblings, 0 replies; 44+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2012-08-23  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     cd75f40f975044bf4f346a29bc6c5870071da519
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 21 02:45:34 2012 +0000
Commit:     Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Tue Aug 21 02:45:34 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=cd75f40f

Stop dropping /etc/portage and instead drop only its contents.
This prevents breakage on later stages as stage1 is the only one that creates /etc/portage.

---
 modules/stage1_target.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/stage1_target.py b/modules/stage1_target.py
index 32e6334..ea29bb0 100644
--- a/modules/stage1_target.py
+++ b/modules/stage1_target.py
@@ -32,7 +32,7 @@ class stage1_target(generic_stage_target):
 		"/usr/lib/python2.3/email", "/usr/lib/python2.3/lib-tk",\
 		"/usr/lib/python2.4/test", "/usr/lib/python2.4/email",\
 		"/usr/lib/python2.4/lib-tk", "/usr/share/zoneinfo",\
-		"/etc/portage"])
+		"/etc/portage/*"])
 
 	# XXX: How do these override_foo() functions differ from the ones in generic_stage_target and why aren't they in stage3_target?
 


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2012-08-23  5:55 Jorge Manuel B. S. Vicetto
  0 siblings, 0 replies; 44+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2012-08-23  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     933f621fecc074e6d97f0c8112f93165bd7492dd
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 21 02:43:00 2012 +0000
Commit:     Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Tue Aug 21 02:43:00 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=933f621f

Stop dropping /etc/portage on stage2. Also drop the custom cleanables from stage2.

---
 modules/stage2_target.py |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/modules/stage2_target.py b/modules/stage2_target.py
index f529721..6c30ea0 100644
--- a/modules/stage2_target.py
+++ b/modules/stage2_target.py
@@ -33,10 +33,6 @@ class stage2_target(generic_stage_target):
 	# XXX: How do these override_foo() functions differ from the ones in
 	# generic_stage_target and why aren't they in stage3_target?
 
-	def set_cleanables(self):
-		generic_stage_target.set_cleanables(self)
-		self.settings["cleanables"].extend(["/etc/portage"])
-	
 	def override_chost(self):
 		if self.settings.has_key("chost"):
 			self.settings["CHOST"]=list_to_string(self.settings["chost"])


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: modules/
@ 2012-08-23  5:55 Jorge Manuel B. S. Vicetto
  0 siblings, 0 replies; 44+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2012-08-23  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     3bd10159bf7cfe14b6d8a8218b94eca73be4c997
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 21 02:44:33 2012 +0000
Commit:     Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Tue Aug 21 02:44:33 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=3bd10159

Drop config_profile_link from the action_sequence for the generic stage.
Instead of creating the profile from python, we're going to use eselect to pick the profile inside the chroot.

---
 modules/generic_stage_target.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index c4ef239..24bf846 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -457,7 +457,7 @@ class generic_stage_target(generic_target):
 	def set_action_sequence(self):
 		""" Default action sequence for run method """
 		self.settings["action_sequence"]=["unpack","unpack_snapshot",\
-				"config_profile_link","setup_confdir","portage_overlay",\
+				"setup_confdir","portage_overlay",\
 				"base_dirs","bind","chroot_setup","setup_environment",\
 				"run_local","preclean","unbind","clean"]
 #		if self.settings.has_key("TARBALL") or \


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

end of thread, other threads:[~2014-01-06  2:00 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-15  4:19 [gentoo-commits] proj/catalyst:master commit in: modules/ Matt Turner
  -- strict thread matches above, loose matches on Subject: below --
2014-01-06  2:00 Brian Dolbec
2014-01-06  2:00 Brian Dolbec
2014-01-06  2:00 Brian Dolbec
2014-01-06  2:00 Brian Dolbec
2014-01-03  6:12 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-01-06  2:00 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2014-01-03  5:03 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-01-06  2:00 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2013-12-15 21:33 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-08-08  5:38 Matt Turner
2013-08-02  5:59 Brian Dolbec
2013-05-27 20:26 Richard Farina
2013-05-27 20:26 Richard Farina
2013-05-27 20:15 Richard Farina
2013-02-23  2:02 Matt Turner
2013-02-23  2:02 Matt Turner
2013-02-23  2:02 Matt Turner
2013-02-23  2:02 Matt Turner
2013-02-23  2:02 Matt Turner
2013-02-05  8:34 Matt Turner
2012-11-22  2:51 Jorge Manuel B. S. Vicetto
2012-11-22  2:51 Jorge Manuel B. S. Vicetto
2012-11-01 20:04 Richard Farina
2012-10-29 20:36 Anthony G. Basile
2012-10-29 20:35 Anthony G. Basile
2012-10-14  5:50 Matt Turner
2012-08-31  0:34 Jorge Manuel B. S. Vicetto
2012-08-29  4:17 Jorge Manuel B. S. Vicetto
2012-08-26 19:30 Jorge Manuel B. S. Vicetto
2012-08-23  5:55 Jorge Manuel B. S. Vicetto
2012-08-23  5:55 Jorge Manuel B. S. Vicetto
2012-08-23  5:55 Jorge Manuel B. S. Vicetto

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