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

commit:     2498ce1f0c45979b29b7af330eaef0c3a17abfa7
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 09:04:29 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue Dec 31 10:00:27 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=2498ce1f

Add remove_chroot and remove_autoresume functions.

---
 catalyst/base/clearbase.py | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py
index e38b1a8..8cad779 100644
--- a/catalyst/base/clearbase.py
+++ b/catalyst/base/clearbase.py
@@ -16,16 +16,28 @@ class ClearBase(object):
 		self.resume = None
 
 
-	def clear_autoresume(self, remove=False):
+	def clear_autoresume(self):
 		""" Clean resume points since they are no longer needed """
 		if "autoresume" in self.settings["options"]:
 			print "Removing AutoResume Points: ..."
 			self.resume.clear_all()
 
 
-	def clear_chroot(self, remove=False):
+	def remove_autoresume(self):
+		""" Rmove all resume points since they are no longer needed """
+		if "autoresume" in self.settings["options"]:
+			print "Removing AutoResume: ..."
+			self.resume.clear_all(remove=True)
+
+
+	def clear_chroot(self):
 		print 'Clearing the chroot path ...'
-		clear_dir(self.settings["chroot_path"], 0755, True, remove)
+		clear_dir(self.settings["chroot_path"], 0755, True)
+
+
+	def remove_chroot(self):
+		print 'Removing the chroot path ...'
+		clear_dir(self.settings["chroot_path"], 0755, True, remove=True)
 
 
 	def clear_packages(self, remove=False):


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2013-12-31 10:48 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2013-12-31 10:48 UTC (permalink / raw
  To: gentoo-commits

commit:     f37d689082ebce4c950a12c20758917a64246368
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 09:00:16 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue Dec 31 10:00:18 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=f37d6890

Report the task exception that occurred.

---
 catalyst/base/stagebase.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index b0144f6..a196c36 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1332,9 +1332,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			sys.stdout.flush()
 			try:
 				apply(getattr(self,x))
-			except:
+			except Exception as e:
+				print "--- Exeption running action sequence:" + x
 				self.mount_safety_check()
-				raise
+				raise e
 
 		self.chroot_lock.unlock()
 


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2013-12-31 10:48 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2013-12-31 10:48 UTC (permalink / raw
  To: gentoo-commits

commit:     18c9910b770651dd770332aad5c967b67d29f064
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 09:03:11 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue Dec 31 10:21:32 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=18c9910b

Remove no longer used touch import.

---
 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 09a29a0..2f00882 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -9,7 +9,7 @@ from stat import ST_UID, ST_GID, ST_MODE
 
 
 from catalyst.support import (CatalystError, msg, file_locate, normpath,
-	touch, cmd, warn, list_bashify, read_makeconf, read_from_clst, ismount)
+	cmd, warn, list_bashify, read_makeconf, read_from_clst, ismount)
 from catalyst.base.targetbase import TargetBase
 from catalyst.base.clearbase import ClearBase
 from catalyst.base.genbase import GenBase


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2013-12-31 10:48 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2013-12-31 10:48 UTC (permalink / raw
  To: gentoo-commits

commit:     b85593f4c839d66511e525b04fa8bae4e7a1117c
Author:     W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Tue Dec 31 09:39:51 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue Dec 31 10:38:12 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=b85593f4

modules/generic_target.py: Pass TERM through to the chroot environment.

Avoid:
  Running stage1-chroot.sh in chroot /var/tmp/catalyst/tmp/default/...
  tput: No value for xterm and no -T specified

---
 catalyst/base/targetbase.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/targetbase.py b/catalyst/base/targetbase.py
index b7a7428..5045a13 100644
--- a/catalyst/base/targetbase.py
+++ b/catalyst/base/targetbase.py
@@ -1,4 +1,5 @@
 
+import os
 
 from catalyst.support import addl_arg_parse
 
@@ -9,5 +10,7 @@ class TargetBase(object):
 	def __init__(self, myspec, addlargs):
 		addl_arg_parse(myspec,addlargs,self.required_values,self.valid_values)
 		self.settings=myspec
-		self.env={}
-		self.env["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
+		self.env = {
+			'PATH': '/bin:/sbin:/usr/bin:/usr/sbin',
+			'TERM': os.getenv('TERM', 'dumb'),
+			}


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2013-12-31 10:48 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2013-12-31 10:48 UTC (permalink / raw
  To: gentoo-commits

commit:     4dcffb8ee95f06a89eb80797b8a3406ba643c029
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 09:06:19 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue Dec 31 10:38:05 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=4dcffb8e

Comment out some debug prints.

---
 catalyst/base/stagebase.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 2f00882..2e64b6e 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -762,9 +762,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				if "autoresume" in self.settings["options"]:
 					print "No Valid Resume point detected, cleaning up..."
 
-				print "unpack()  clear_autoresume"
+				#print "unpack()  clear_autoresume"
 				self.clear_autoresume()
-				print "unpack()  clear_chroot()"
+				#print "unpack()  clear_chroot()"
 				self.clear_chroot()
 
 			ensure_dirs(self.settings["chroot_path"])


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2013-12-31 10:48 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2013-12-31 10:48 UTC (permalink / raw
  To: gentoo-commits

commit:     3540e3fc0c84edc104d3703a993869b25a9810b5
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 09:02:25 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue Dec 31 10:21:32 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=3540e3fc

Remove no longer unused imports.

---
 catalyst/base/clearbase.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py
index 8cad779..1a6ec77 100644
--- a/catalyst/base/clearbase.py
+++ b/catalyst/base/clearbase.py
@@ -1,11 +1,7 @@
 
-import os
-import shutil
-from stat import ST_UID, ST_GID, ST_MODE
 
-
-from catalyst.support import cmd, countdown
-from catalyst.fileops import ensure_dirs, clear_dir
+from catalyst.support import countdown
+from catalyst.fileops import clear_dir
 
 class ClearBase(object):
 	"""


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2013-12-31 10:48 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2013-12-31 10:48 UTC (permalink / raw
  To: gentoo-commits

commit:     0b9b7c9e631b29395d40c630d141513e6e897028
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 09:07:30 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue Dec 31 10:21:11 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=0b9b7c9e

Conditionally add keepwork option to action sequence

---
 catalyst/base/stagebase.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a196c36..09a29a0 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -501,7 +501,13 @@ class StageBase(TargetBase, ClearBase, GenBase):
 #			"fetch" not in self.settings["options"]:
 		if "fetch" not in self.settings["options"]:
 			self.settings["action_sequence"].append("capture")
-		self.settings["action_sequence"].append("clear_autoresume")
+		if "keepwork" in self.settings["options"]:
+			self.settings["action_sequence"].append("clear_autoresume")
+		elif "seedcache" in self.settings["options"]:
+			self.settings["action_sequence"].append("remove_autoresume")
+		else:
+			self.settings["action_sequence"].append("remove_autoresume")
+			self.settings["action_sequence"].append("remove_chroot")
 
 	def set_use(self):
 		if self.settings["spec_prefix"]+"/use" in self.settings:


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2013-12-31 10:48 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2013-12-31 10:48 UTC (permalink / raw
  To: gentoo-commits

commit:     110583e6cb81ecf4547e976d72a7e76a85d355ea
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 10:26:14 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue Dec 31 10:38:12 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=110583e6

Remove some dead code

---
 catalyst/base/stagebase.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 2e64b6e..a0b3fc2 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -497,8 +497,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				"setup_confdir","portage_overlay",\
 				"base_dirs","bind","chroot_setup","setup_environment",\
 				"run_local","preclean","unbind","clean"]
-#		if "TARBALL" in self.settings or \
-#			"fetch" not in self.settings["options"]:
 		if "fetch" not in self.settings["options"]:
 			self.settings["action_sequence"].append("capture")
 		if "keepwork" in self.settings["options"]:


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

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

commit:     19a9430dbec3c3d5b380e8c6309ba41241ef9fdc
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 09:07:30 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 18:02:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=19a9430d

Conditionally add keepwork option to action sequence

---
 catalyst/base/stagebase.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a196c36..09a29a0 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -501,7 +501,13 @@ class StageBase(TargetBase, ClearBase, GenBase):
 #			"fetch" not in self.settings["options"]:
 		if "fetch" not in self.settings["options"]:
 			self.settings["action_sequence"].append("capture")
-		self.settings["action_sequence"].append("clear_autoresume")
+		if "keepwork" in self.settings["options"]:
+			self.settings["action_sequence"].append("clear_autoresume")
+		elif "seedcache" in self.settings["options"]:
+			self.settings["action_sequence"].append("remove_autoresume")
+		else:
+			self.settings["action_sequence"].append("remove_autoresume")
+			self.settings["action_sequence"].append("remove_chroot")
 
 	def set_use(self):
 		if self.settings["spec_prefix"]+"/use" in self.settings:


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

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

commit:     193edf179b5d2c32c6754c51aa5313c8da00fe94
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 09:03:11 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 18:02:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=193edf17

Remove no longer used touch import.

---
 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 09a29a0..2f00882 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -9,7 +9,7 @@ from stat import ST_UID, ST_GID, ST_MODE
 
 
 from catalyst.support import (CatalystError, msg, file_locate, normpath,
-	touch, cmd, warn, list_bashify, read_makeconf, read_from_clst, ismount)
+	cmd, warn, list_bashify, read_makeconf, read_from_clst, ismount)
 from catalyst.base.targetbase import TargetBase
 from catalyst.base.clearbase import ClearBase
 from catalyst.base.genbase import GenBase


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

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

commit:     f2bae5337e0ea58e9e8c5859f60f38f87271e4ca
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 09:02:25 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 18:02:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=f2bae533

Remove no longer unused imports.

---
 catalyst/base/clearbase.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py
index 8cad779..1a6ec77 100644
--- a/catalyst/base/clearbase.py
+++ b/catalyst/base/clearbase.py
@@ -1,11 +1,7 @@
 
-import os
-import shutil
-from stat import ST_UID, ST_GID, ST_MODE
 
-
-from catalyst.support import cmd, countdown
-from catalyst.fileops import ensure_dirs, clear_dir
+from catalyst.support import countdown
+from catalyst.fileops import clear_dir
 
 class ClearBase(object):
 	"""


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

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

commit:     8cbc93f4249d2bd6c96869b90d632901e15f0969
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 09:00:16 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 18:02:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=8cbc93f4

Report the task exception that occurred.

---
 catalyst/base/stagebase.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index b0144f6..a196c36 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1332,9 +1332,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			sys.stdout.flush()
 			try:
 				apply(getattr(self,x))
-			except:
+			except Exception as e:
+				print "--- Exeption running action sequence:" + x
 				self.mount_safety_check()
-				raise
+				raise e
 
 		self.chroot_lock.unlock()
 


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

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

commit:     02b3cb7a8d5c9d8d21105feda6868080416721c1
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 09:04:29 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 18:02:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=02b3cb7a

Add remove_chroot and remove_autoresume functions.

---
 catalyst/base/clearbase.py | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py
index e38b1a8..8cad779 100644
--- a/catalyst/base/clearbase.py
+++ b/catalyst/base/clearbase.py
@@ -16,16 +16,28 @@ class ClearBase(object):
 		self.resume = None
 
 
-	def clear_autoresume(self, remove=False):
+	def clear_autoresume(self):
 		""" Clean resume points since they are no longer needed """
 		if "autoresume" in self.settings["options"]:
 			print "Removing AutoResume Points: ..."
 			self.resume.clear_all()
 
 
-	def clear_chroot(self, remove=False):
+	def remove_autoresume(self):
+		""" Rmove all resume points since they are no longer needed """
+		if "autoresume" in self.settings["options"]:
+			print "Removing AutoResume: ..."
+			self.resume.clear_all(remove=True)
+
+
+	def clear_chroot(self):
 		print 'Clearing the chroot path ...'
-		clear_dir(self.settings["chroot_path"], 0755, True, remove)
+		clear_dir(self.settings["chroot_path"], 0755, True)
+
+
+	def remove_chroot(self):
+		print 'Removing the chroot path ...'
+		clear_dir(self.settings["chroot_path"], 0755, True, remove=True)
 
 
 	def clear_packages(self, remove=False):


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

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

commit:     2b94638208fc2e40f765ce081b3df93b173c1559
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 10:26:14 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 18:02:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=2b946382

Remove some dead code

---
 catalyst/base/stagebase.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 2e64b6e..a0b3fc2 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -497,8 +497,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				"setup_confdir","portage_overlay",\
 				"base_dirs","bind","chroot_setup","setup_environment",\
 				"run_local","preclean","unbind","clean"]
-#		if "TARBALL" in self.settings or \
-#			"fetch" not in self.settings["options"]:
 		if "fetch" not in self.settings["options"]:
 			self.settings["action_sequence"].append("capture")
 		if "keepwork" in self.settings["options"]:


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

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

commit:     7d07dfc12dd1de9f12e37484ebf6093e423ec8b9
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 17:47:07 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 18:02:22 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=7d07dfc1

fix a "lockfile does not exist" issue at the end of the run.

---
 catalyst/base/clearbase.py | 2 ++
 catalyst/base/stagebase.py | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py
index 1a6ec77..a9f1d22 100644
--- a/catalyst/base/clearbase.py
+++ b/catalyst/base/clearbase.py
@@ -27,11 +27,13 @@ class ClearBase(object):
 
 
 	def clear_chroot(self):
+		self.chroot_lock.unlock()
 		print 'Clearing the chroot path ...'
 		clear_dir(self.settings["chroot_path"], 0755, True)
 
 
 	def remove_chroot(self):
+		self.chroot_lock.unlock()
 		print 'Removing the chroot path ...'
 		clear_dir(self.settings["chroot_path"], 0755, True, remove=True)
 

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a0b3fc2..f42d943 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1341,7 +1341,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.mount_safety_check()
 				raise e
 
-		self.chroot_lock.unlock()
 
 	def unmerge(self):
 		if "autoresume" in self.settings["options"] \


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

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

commit:     bf3a00171b00602f7124f2a083f8967a164f589f
Author:     W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Tue Dec 31 09:39:51 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 18:02:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=bf3a0017

modules/generic_target.py: Pass TERM through to the chroot environment.

Avoid:
  Running stage1-chroot.sh in chroot /var/tmp/catalyst/tmp/default/...
  tput: No value for xterm and no -T specified

---
 catalyst/base/targetbase.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/targetbase.py b/catalyst/base/targetbase.py
index b7a7428..5045a13 100644
--- a/catalyst/base/targetbase.py
+++ b/catalyst/base/targetbase.py
@@ -1,4 +1,5 @@
 
+import os
 
 from catalyst.support import addl_arg_parse
 
@@ -9,5 +10,7 @@ class TargetBase(object):
 	def __init__(self, myspec, addlargs):
 		addl_arg_parse(myspec,addlargs,self.required_values,self.valid_values)
 		self.settings=myspec
-		self.env={}
-		self.env["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
+		self.env = {
+			'PATH': '/bin:/sbin:/usr/bin:/usr/sbin',
+			'TERM': os.getenv('TERM', 'dumb'),
+			}


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

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

commit:     3fa840df90a4a0b994eb46405ac213ede5c7cf1f
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 09:06:19 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 18:02:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=3fa840df

Comment out some debug prints.

---
 catalyst/base/stagebase.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 2f00882..2e64b6e 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -762,9 +762,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				if "autoresume" in self.settings["options"]:
 					print "No Valid Resume point detected, cleaning up..."
 
-				print "unpack()  clear_autoresume"
+				#print "unpack()  clear_autoresume"
 				self.clear_autoresume()
-				print "unpack()  clear_chroot()"
+				#print "unpack()  clear_chroot()"
 				self.clear_chroot()
 
 			ensure_dirs(self.settings["chroot_path"])


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

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

commit:     c88d930a286a836ffe137a46d13d15c70ccb6b67
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 11 00:13:06 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Jan 22 04:36:25 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=c88d930a

generic_stage_target.py: Fix an intermittent snapshot_cache_path keyerror

---
 catalyst/base/stagebase.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index f7397e7..d1109c5 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -458,10 +458,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 						verbose=False)
 
 	def set_snapcache_path(self):
+		self.settings["snapshot_cache_path"] = \
+			normpath(pjoin(self.settings["snapshot_cache"],
+				self.settings["snapshot"]))
 		if "snapcache" in self.settings["options"]:
-			self.settings["snapshot_cache_path"]=\
-				normpath(pjoin(self.settings["snapshot_cache"],
-					self.settings["snapshot"]))
 			self.snapcache_lock=\
 				LockDir(self.settings["snapshot_cache_path"])
 			print "Caching snapshot to "+self.settings["snapshot_cache_path"]


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

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

commit:     68c338743f06cdd76b4e35fb2094b025864bec17
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 01:53:01 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Jan 22 04:35:17 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=68c33874

Use cmd instead of os.system(), simplify code duplication.

---
 catalyst/base/stagebase.py | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 3021620..f7397e7 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -927,6 +927,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	def bind(self):
 		for x in self.mounts:
+			_cmd = ''
 			#print "bind(); x =", x
 			target = normpath(self.settings["chroot_path"] + self.target_mounts[x])
 			ensure_dirs(target, mode=0755)
@@ -941,28 +942,22 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.snapshot_lock_object.read_lock()
 			if os.uname()[0] == "FreeBSD":
 				if src == "/dev":
-					cmd = "mount -t devfs none " + target
-					retval=os.system(cmd)
+					_cmd = "mount -t devfs none " + target
 				else:
-					cmd = "mount_nullfs " + src + " " + target
-					retval=os.system(cmd)
+					_cmd = "mount_nullfs " + src + " " + target
 			else:
 				if src == "tmpfs":
 					if "var_tmpfs_portage" in self.settings:
-						cmd = "mount -t tmpfs -o size=" + \
+						_cmd = "mount -t tmpfs -o size=" + \
 							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)
+					_cmd = "mount -t tmpfs -o noexec,nosuid,nodev shm " + target
 				else:
-					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 + "\n" + cmd)
+					_cmd = "mount --bind " + src + " " + target
+			#print "bind(); _cmd =", _cmd
+			cmd(_cmd, "Bind mounting Failed", env=self.env, fail_func=self.unbind)
+		#print "bind(); finished :D"
 
 	def unbind(self):
 		ouch=0


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2014-02-19 17:47 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2014-02-19 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     b9345b8f4f9586a100a8377e4eacc9630804dd58
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:40:01 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Feb 19 17:32:02 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=b9345b8f

Allow kernelopts as a valid value for kernels.

---
 catalyst/base/stagebase.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index d1109c5..8518783 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -609,6 +609,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.valid_values.append("boot/kernel/"+x+"/softlevel")
 				self.valid_values.append("boot/kernel/"+x+"/use")
 				self.valid_values.append("boot/kernel/"+x+"/packages")
+				self.valid_values.append("boot/kernel/"+x+"/kernelopts")
 				if "boot/kernel/"+x+"/packages" in addlargs:
 					if type(addlargs["boot/kernel/"+x+\
 						"/packages"])==types.StringType:


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2014-03-01 18:51 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2014-03-01 18:51 UTC (permalink / raw
  To: gentoo-commits

commit:     c86002b3a49b109cd8424dcba85e8133711c47d4
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  1 16:58:24 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sat Mar  1 17:36:17 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=c86002b3

catalyst/base/clearbase.py: Fix remove parameter mistakes.

fixes commit: 02b3cb7a8d5c9d8d21105feda6868080416721c1
    Add remove_chroot and remove_autoresume functions.
    Brian Dolbec <dolsen <AT> gentoo.org> (Tue 31 Dec 2013 01:04:29 AM PST)

---
 catalyst/base/clearbase.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py
index a9f1d22..b2c1a11 100644
--- a/catalyst/base/clearbase.py
+++ b/catalyst/base/clearbase.py
@@ -55,10 +55,10 @@ class ClearBase(object):
 		if any(k in self.settings["options"] for k in ("purge",
 				"purgeonly", "purgetmponly")):
 			print "purge(); clearing autoresume ..."
-			self.clear_autoresume(remove)
+			self.clear_autoresume()
 
 			print "purge(); clearing chroot ..."
-			self.clear_chroot(remove)
+			self.clear_chroot()
 
 			if "purgetmponly" not in self.settings["options"]:
 				print "purge(); clearing package cache ..."


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2014-03-04  1:57 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2014-03-04  1:57 UTC (permalink / raw
  To: gentoo-commits

commit:     1ef6c1432fc4c8f5011bf3234f799f261ca1a8f9
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  4 01:56:56 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue Mar  4 01:56:56 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=1ef6c143

Fix purgeonly to remove the chroot directory.

---
 catalyst/base/stagebase.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 8518783..d2c9531 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -501,6 +501,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	def set_action_sequence(self):
 		""" Default action sequence for run method """
+		if "purgeonly" in self.settings["options"]:
+			self.settings["action_sequence"] = ["remove_chroot"]
+			return
 		self.settings["action_sequence"]=["unpack","unpack_snapshot",\
 				"setup_confdir","portage_overlay",\
 				"base_dirs","bind","chroot_setup","setup_environment",\
@@ -514,6 +517,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			self.settings["action_sequence"].append("remove_autoresume")
 			self.settings["action_sequence"].append("remove_chroot")
+		return
 
 	def set_use(self):
 		if self.settings["spec_prefix"]+"/use" in self.settings:
@@ -1329,12 +1333,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			return
 
 		if "purgeonly" in self.settings["options"]:
-			#print "StageBase: run() purgeonly"
+			print "StageBase: run() purgeonly"
 			self.purge()
-			return
 
 		if "purge" in self.settings["options"]:
-			#print "StageBase: run() purge"
+			print "StageBase: run() purge"
 			self.purge()
 
 		#print "--- Running action sequences:", self.settings["action_sequence"]


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

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

commit:     2dcbb861ff7c85240f0a44df17a3184f1a7ccc40
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  5 07:26:58 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sat Apr  5 07:29:49 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=2dcbb861

generic_stage_target: Add a trailing / to the cp /etc/reolv.conf command

---
 catalyst/base/stagebase.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index d2c9531..e4462fc 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1024,8 +1024,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			print "Setting up chroot..."
 
-			cmd("cp /etc/resolv.conf "+self.settings["chroot_path"]+"/etc",\
-				"Could not copy resolv.conf into place.",env=self.env)
+			cmd("cp /etc/resolv.conf " + self.settings["chroot_path"] + "/etc" \
+				+ '/', "Could not copy resolv.conf into place.",env=self.env)
 
 			""" Copy over the envscript, if applicable """
 			if "envscript" in self.settings:


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2014-04-05  7:39 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2014-04-05  7:39 UTC (permalink / raw
  To: gentoo-commits

commit:     6104832776d0748f26a50e8a0e69009c3af0e213
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  5 07:26:58 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sat Apr  5 07:38:19 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=61048327

generic_stage_target: Add a trailing / to the cp /etc/reolv.conf command

---
 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index d2c9531..395582f 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1024,7 +1024,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			print "Setting up chroot..."
 
-			cmd("cp /etc/resolv.conf "+self.settings["chroot_path"]+"/etc",\
+			cmd("cp /etc/resolv.conf " + self.settings["chroot_path"] + "/etc/",
 				"Could not copy resolv.conf into place.",env=self.env)
 
 			""" Copy over the envscript, if applicable """


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2014-04-18 15:53 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2014-04-18 15:53 UTC (permalink / raw
  To: gentoo-commits

commit:     237fb76b6148dcd4c5a4bf4c365633ce9c90bd0f
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 18 15:53:09 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 15:53:09 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=237fb76b

stagebase: Fix rsync from copying stage2 inside stage3

Fixes the resolv.conf issue due to /etc not existing.
Fix supplied by GMsoft.

---
 catalyst/base/stagebase.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 395582f..52cf04e 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -402,8 +402,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if "seedcache" in self.settings["options"]\
 			and os.path.isdir(normpath(self.settings["storedir"]+"/tmp/"+\
 				self.settings["source_subpath"]+"/")):
-			self.settings["source_path"]=normpath(self.settings["storedir"]+\
-				"/tmp/"+self.settings["source_subpath"])
+			self.settings["source_path"] = normpath(self.settings["storedir"] +
+				"/tmp/" + self.settings["source_subpath"] + "/")
 		else:
 			self.settings["source_path"]=normpath(self.settings["storedir"]+\
 				"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2")


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     40e80db729938c776b98b65812bc6a50b27f8c4f
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 01:53:01 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:36 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=40e80db7

Use cmd instead of os.system(), simplify code duplication.

---
 catalyst/base/stagebase.py | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index aa9be38..90dd37d 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -927,6 +927,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	def bind(self):
 		for x in self.mounts:
+			_cmd = ''
 			#print "bind(); x =", x
 			target = normpath(self.settings["chroot_path"] + self.target_mounts[x])
 			ensure_dirs(target, mode=0755)
@@ -941,28 +942,22 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.snapshot_lock_object.read_lock()
 			if os.uname()[0] == "FreeBSD":
 				if src == "/dev":
-					cmd = "mount -t devfs none " + target
-					retval=os.system(cmd)
+					_cmd = "mount -t devfs none " + target
 				else:
-					cmd = "mount_nullfs " + src + " " + target
-					retval=os.system(cmd)
+					_cmd = "mount_nullfs " + src + " " + target
 			else:
 				if src == "tmpfs":
 					if "var_tmpfs_portage" in self.settings:
-						cmd = "mount -t tmpfs -o size=" + \
+						_cmd = "mount -t tmpfs -o size=" + \
 							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)
+					_cmd = "mount -t tmpfs -o noexec,nosuid,nodev shm " + target
 				else:
-					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 + "\n" + cmd)
+					_cmd = "mount --bind " + src + " " + target
+			#print "bind(); _cmd =", _cmd
+			cmd(_cmd, "Bind mounting Failed", env=self.env, fail_func=self.unbind)
+		#print "bind(); finished :D"
 
 	def unbind(self):
 		ouch=0


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     9da08e01a9a2fc5ae693b19f64bcd7f0aab6bde4
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 11 00:13:06 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:36 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=9da08e01

generic_stage_target.py: Fix an intermittent snapshot_cache_path keyerror

---
 catalyst/base/stagebase.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 90dd37d..744ce08 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -458,10 +458,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 						verbose=False)
 
 	def set_snapcache_path(self):
+		self.settings["snapshot_cache_path"] = \
+			normpath(pjoin(self.settings["snapshot_cache"],
+				self.settings["snapshot"]))
 		if "snapcache" in self.settings["options"]:
-			self.settings["snapshot_cache_path"]=\
-				normpath(pjoin(self.settings["snapshot_cache"],
-					self.settings["snapshot"]))
 			self.snapcache_lock=\
 				LockDir(self.settings["snapshot_cache_path"])
 			print "Caching snapshot to "+self.settings["snapshot_cache_path"]


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     37df49714acd34ad61e129dc9ed821c797b73fe9
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:40:01 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:36 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=37df4971

Allow kernelopts as a valid value for kernels.

---
 catalyst/base/stagebase.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 744ce08..38bfbe7 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -609,6 +609,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.valid_values.append("boot/kernel/"+x+"/softlevel")
 				self.valid_values.append("boot/kernel/"+x+"/use")
 				self.valid_values.append("boot/kernel/"+x+"/packages")
+				self.valid_values.append("boot/kernel/"+x+"/kernelopts")
 				if "boot/kernel/"+x+"/packages" in addlargs:
 					if type(addlargs["boot/kernel/"+x+\
 						"/packages"])==types.StringType:


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     4f5fb5e4f51ebf88e915271aa7e2ad2d4b347f46
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  5 07:26:58 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:37 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=4f5fb5e4

generic_stage_target: Add a trailing / to the cp /etc/reolv.conf command

---
 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index cb8d4d6..52cf04e 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1024,7 +1024,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			print "Setting up chroot..."
 
-			cmd("cp /etc/resolv.conf "+self.settings["chroot_path"]+"/etc",\
+			cmd("cp /etc/resolv.conf " + self.settings["chroot_path"] + "/etc/",
 				"Could not copy resolv.conf into place.",env=self.env)
 
 			""" Copy over the envscript, if applicable """


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     3dc72b549a24e4daa2c2344338dd0c05c9c1e955
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  1 16:58:24 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:37 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=3dc72b54

catalyst/base/clearbase.py: Fix remove parameter mistakes.

fixes commit: 02b3cb7a8d5c9d8d21105feda6868080416721c1
    Add remove_chroot and remove_autoresume functions.
    Brian Dolbec <dolsen <AT> gentoo.org> (Tue 31 Dec 2013 01:04:29 AM PST)

---
 catalyst/base/clearbase.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py
index a9f1d22..b2c1a11 100644
--- a/catalyst/base/clearbase.py
+++ b/catalyst/base/clearbase.py
@@ -55,10 +55,10 @@ class ClearBase(object):
 		if any(k in self.settings["options"] for k in ("purge",
 				"purgeonly", "purgetmponly")):
 			print "purge(); clearing autoresume ..."
-			self.clear_autoresume(remove)
+			self.clear_autoresume()
 
 			print "purge(); clearing chroot ..."
-			self.clear_chroot(remove)
+			self.clear_chroot()
 
 			if "purgetmponly" not in self.settings["options"]:
 				print "purge(); clearing package cache ..."


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

* [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 31+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     61494ce767d3ac1361374b2236e22fe597aa9155
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  4 01:56:56 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:37 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=61494ce7

Fix purgeonly to remove the chroot directory.

---
 catalyst/base/stagebase.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 38bfbe7..cb8d4d6 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -501,6 +501,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	def set_action_sequence(self):
 		""" Default action sequence for run method """
+		if "purgeonly" in self.settings["options"]:
+			self.settings["action_sequence"] = ["remove_chroot"]
+			return
 		self.settings["action_sequence"]=["unpack","unpack_snapshot",\
 				"setup_confdir","portage_overlay",\
 				"base_dirs","bind","chroot_setup","setup_environment",\
@@ -514,6 +517,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			self.settings["action_sequence"].append("remove_autoresume")
 			self.settings["action_sequence"].append("remove_chroot")
+		return
 
 	def set_use(self):
 		if self.settings["spec_prefix"]+"/use" in self.settings:
@@ -1329,12 +1333,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			return
 
 		if "purgeonly" in self.settings["options"]:
-			#print "StageBase: run() purgeonly"
+			print "StageBase: run() purgeonly"
 			self.purge()
-			return
 
 		if "purge" in self.settings["options"]:
-			#print "StageBase: run() purge"
+			print "StageBase: run() purge"
 			self.purge()
 
 		#print "--- Running action sequences:", self.settings["action_sequence"]


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

end of thread, other threads:[~2014-04-18 16:52 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-31 10:48 [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/base/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2013-12-31 10:48 Brian Dolbec
2013-12-31 10:48 Brian Dolbec
2013-12-31 10:48 Brian Dolbec
2013-12-31 10:48 Brian Dolbec
2013-12-31 10:48 Brian Dolbec
2013-12-31 10:48 Brian Dolbec
2013-12-31 10:48 Brian Dolbec
2014-01-22  5:04 Brian Dolbec
2014-01-22  5:04 Brian Dolbec
2014-01-22  5:04 Brian Dolbec
2014-01-22  5:04 Brian Dolbec
2014-01-22  5:04 Brian Dolbec
2014-01-22  5:04 Brian Dolbec
2014-01-22  5:04 Brian Dolbec
2014-01-22  5:04 Brian Dolbec
2014-01-22  5:04 Brian Dolbec
2014-01-22  5:04 Brian Dolbec
2014-01-22  5:04 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-03-01 18:51 Brian Dolbec
2014-03-04  1:57 Brian Dolbec
2014-04-05  7:31 Brian Dolbec
2014-04-05  7:39 Brian Dolbec
2014-04-18 15:53 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec

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