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

commit:     bbb3acb456b5eee93d8baa2c7fe8660c2ef9ddda
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 11 16:07:03 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Nov 21 09:00:11 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=bbb3acb4

fix '-' in stage names for python imports

---
 catalyst/main.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index 26e0c8b..3f37ad0 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -157,11 +157,12 @@ def import_module(target):
 
 def build_target(addlargs):
 	try:
-		module = import_module(addlargs["target"])
-		target = getattr(module, addlargs["target"])(conf_values, addlargs)
+		target = addlargs["target"].replace('-', '_')
+		module = import_module(target)
+		target = getattr(module, target)(conf_values, addlargs)
 	except AttributeError:
 		raise CatalystError(
-			"Target \"%s\" not available." % addlargs["target"],
+			"Target \"%s\" not available." % target,
 			print_traceback=True)
 
 	try:


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

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

commit:     3921f3431e515a7b663672484fd0edc46e3628dc
Author:     W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Tue Jun 11 21:41:18 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Nov 21 09:00:11 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=3921f343

version: Remove shebang (Python modules are not scripts)

Nobody should be executing this file directly.

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

diff --git a/catalyst/version.py b/catalyst/version.py
index d379d35..8060bff 100644
--- a/catalyst/version.py
+++ b/catalyst/version.py
@@ -1,5 +1,3 @@
-#!/usr/bin/python -OO
-
 # Maintained in full by:
 # Catalyst Team <catalyst@gentoo.org>
 # Release Engineering Team <releng@gentoo.org>


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

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

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

main.py, lock.py, fileops.py  remove shebangs

---
 catalyst/fileops.py | 1 -
 catalyst/lock.py    | 3 ++-
 catalyst/main.py    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/catalyst/fileops.py b/catalyst/fileops.py
index 009bf1c..e3a4ead 100644
--- a/catalyst/fileops.py
+++ b/catalyst/fileops.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
 
 # Maintained in full by:
 # Catalyst Team <catalyst@gentoo.org>

diff --git a/catalyst/lock.py b/catalyst/lock.py
index d5d40d5..8b4fc76 100644
--- a/catalyst/lock.py
+++ b/catalyst/lock.py
@@ -1,4 +1,5 @@
-#!/usr/bin/python
+
+
 import os
 import fcntl
 import errno

diff --git a/catalyst/main.py b/catalyst/main.py
index 3f37ad0..6f8bd8d 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python -OO
 
 # Maintained in full by:
 # Catalyst Team <catalyst@gentoo.org>


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

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

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

main.py, lock.py, fileops.py  remove shebangs

---
 catalyst/fileops.py | 1 -
 catalyst/lock.py    | 3 ++-
 catalyst/main.py    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/catalyst/fileops.py b/catalyst/fileops.py
index 009bf1c..e3a4ead 100644
--- a/catalyst/fileops.py
+++ b/catalyst/fileops.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
 
 # Maintained in full by:
 # Catalyst Team <catalyst@gentoo.org>

diff --git a/catalyst/lock.py b/catalyst/lock.py
index d5d40d5..8b4fc76 100644
--- a/catalyst/lock.py
+++ b/catalyst/lock.py
@@ -1,4 +1,5 @@
-#!/usr/bin/python
+
+
 import os
 import fcntl
 import errno

diff --git a/catalyst/main.py b/catalyst/main.py
index 3f37ad0..6f8bd8d 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python -OO
 
 # Maintained in full by:
 # Catalyst Team <catalyst@gentoo.org>


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

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

commit:     68477519c33bc58ac8ac76090861525020d7221f
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 01:55:24 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Jan 22 04:36:06 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=68477519

sankeoil import fix

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

diff --git a/catalyst/support.py b/catalyst/support.py
index cafb5d2..08bddfe 100644
--- a/catalyst/support.py
+++ b/catalyst/support.py
@@ -215,8 +215,8 @@ def read_makeconf(mymakeconffile):
 	if os.path.exists(mymakeconffile):
 		try:
 			try:
-				import snakeoil.fileutils
-				return snakeoil.fileutils.read_bash_dict(mymakeconffile, sourcing_command="source")
+				import snakeoil.bash #import snakeoil.fileutils
+				return snakeoil.bash.read_bash_dict(mymakeconffile, sourcing_command="source")
 			except ImportError:
 				try:
 					import portage.util


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

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

commit:     4fc05408af380d443178943f3194b485da92f6b8
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 01:55:04 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Jan 22 04:36:01 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=4fc05408

Take most cmd() code out to the try: except: pairs

---
 catalyst/support.py | 34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)

diff --git a/catalyst/support.py b/catalyst/support.py
index 3db1509..cafb5d2 100644
--- a/catalyst/support.py
+++ b/catalyst/support.py
@@ -120,25 +120,29 @@ def find_binary(myc):
 	return None
 
 
-def cmd(mycmd, myexc="", env={}, debug=False):
+def cmd(mycmd, myexc="", env={}, debug=False, fail_func=None):
+	#print "***** cmd()"
+	sys.stdout.flush()
+	args=[BASH_BINARY]
+	if "BASH_ENV" not in env:
+		env["BASH_ENV"] = "/etc/spork/is/not/valid/profile.env"
+	if debug:
+		args.append("-x")
+	args.append("-c")
+	args.append(mycmd)
+
+	#if debug:
+	print "***** cmd(); args =", args
 	try:
-		sys.stdout.flush()
-		args=[BASH_BINARY]
-		if "BASH_ENV" not in env:
-			env["BASH_ENV"] = "/etc/spork/is/not/valid/profile.env"
-		if debug:
-			args.append("-x")
-		args.append("-c")
-		args.append(mycmd)
-
-		#if debug:
-		print "***** cmd(); args =", args
 		proc = Popen(args, env=env)
-		if proc.wait() != 0:
-			raise CatalystError("cmd() NON-zero return value from: %s" % myexc,
-				print_traceback=False)
 	except:
 		raise
+	if proc.wait() != 0:
+		if fail_func:
+			print "CMD(), NON-Zero command return.  Running fail_func()"
+			fail_func()
+		raise CatalystError("cmd() NON-zero return value from: %s" % myexc,
+			print_traceback=False)
 
 
 def file_locate(settings,filelist,expand=1):


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

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

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

Remove excessive exceptions hiding tracebacks

---
 catalyst/main.py | 28 ++++++----------------------
 1 file changed, 6 insertions(+), 22 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index 6f8bd8d..0366932 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -349,10 +349,10 @@ def main():
 	try:
 		build_target(addlargs)
 
-	except CatalystError:
-		print
-		print "Catalyst aborting...."
-		sys.exit(2)
+	#except CatalystError:
+	#	print
+	#	print "Catalyst aborting...."
+	#	sys.exit(2)
 	except KeyboardInterrupt:
 		print "\nCatalyst build aborted due to user interrupt ( Ctrl-C )"
 		print
@@ -361,24 +361,8 @@ def main():
 	except LockInUse:
 		print "Catalyst aborting...."
 		sys.exit(2)
-	except:
-		print "Catalyst aborting...."
-		raise
-		sys.exit(2)
-
-	#except CatalystError:
-	#	print
-	#	print "Catalyst aborting...."
-	#	sys.exit(2)
-	#except KeyError:
-	#	print "\nproblem with command line or spec file ( Key Error )"
-	#	print "Key: "+str(sys.exc_value)+" was not found"
+	#except:
 	#	print "Catalyst aborting...."
-	#	sys.exit(2)
-	#except UnboundLocalError:
-	#	print
-	#	print "UnboundLocalError: "+str(sys.exc_value)+" was not found"
 	#	raise
-	#	print
-	#	print "Catalyst aborting...."
 	#	sys.exit(2)
+


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

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

commit:     12eabbc4ef91e04b08a301580f7dd345666b118b
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 01:55:04 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=12eabbc4

Take most cmd() code out to the try: except: pairs

---
 catalyst/support.py | 34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)

diff --git a/catalyst/support.py b/catalyst/support.py
index 3db1509..cafb5d2 100644
--- a/catalyst/support.py
+++ b/catalyst/support.py
@@ -120,25 +120,29 @@ def find_binary(myc):
 	return None
 
 
-def cmd(mycmd, myexc="", env={}, debug=False):
+def cmd(mycmd, myexc="", env={}, debug=False, fail_func=None):
+	#print "***** cmd()"
+	sys.stdout.flush()
+	args=[BASH_BINARY]
+	if "BASH_ENV" not in env:
+		env["BASH_ENV"] = "/etc/spork/is/not/valid/profile.env"
+	if debug:
+		args.append("-x")
+	args.append("-c")
+	args.append(mycmd)
+
+	#if debug:
+	print "***** cmd(); args =", args
 	try:
-		sys.stdout.flush()
-		args=[BASH_BINARY]
-		if "BASH_ENV" not in env:
-			env["BASH_ENV"] = "/etc/spork/is/not/valid/profile.env"
-		if debug:
-			args.append("-x")
-		args.append("-c")
-		args.append(mycmd)
-
-		#if debug:
-		print "***** cmd(); args =", args
 		proc = Popen(args, env=env)
-		if proc.wait() != 0:
-			raise CatalystError("cmd() NON-zero return value from: %s" % myexc,
-				print_traceback=False)
 	except:
 		raise
+	if proc.wait() != 0:
+		if fail_func:
+			print "CMD(), NON-Zero command return.  Running fail_func()"
+			fail_func()
+		raise CatalystError("cmd() NON-zero return value from: %s" % myexc,
+			print_traceback=False)
 
 
 def file_locate(settings,filelist,expand=1):


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

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

commit:     4d0fc4cfa8b46c05c443908a5cf526ca8a07d902
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 01:55:24 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=4d0fc4cf

sankeoil import fix

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

diff --git a/catalyst/support.py b/catalyst/support.py
index cafb5d2..08bddfe 100644
--- a/catalyst/support.py
+++ b/catalyst/support.py
@@ -215,8 +215,8 @@ def read_makeconf(mymakeconffile):
 	if os.path.exists(mymakeconffile):
 		try:
 			try:
-				import snakeoil.fileutils
-				return snakeoil.fileutils.read_bash_dict(mymakeconffile, sourcing_command="source")
+				import snakeoil.bash #import snakeoil.fileutils
+				return snakeoil.bash.read_bash_dict(mymakeconffile, sourcing_command="source")
 			except ImportError:
 				try:
 					import portage.util


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

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

commit:     b0c412abe2692cb3697e79aaa90eb040eba88160
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 01:54:08 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=b0c412ab

Remove excessive exceptions hiding tracebacks

---
 catalyst/main.py | 28 ++++++----------------------
 1 file changed, 6 insertions(+), 22 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index 6f8bd8d..0366932 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -349,10 +349,10 @@ def main():
 	try:
 		build_target(addlargs)
 
-	except CatalystError:
-		print
-		print "Catalyst aborting...."
-		sys.exit(2)
+	#except CatalystError:
+	#	print
+	#	print "Catalyst aborting...."
+	#	sys.exit(2)
 	except KeyboardInterrupt:
 		print "\nCatalyst build aborted due to user interrupt ( Ctrl-C )"
 		print
@@ -361,24 +361,8 @@ def main():
 	except LockInUse:
 		print "Catalyst aborting...."
 		sys.exit(2)
-	except:
-		print "Catalyst aborting...."
-		raise
-		sys.exit(2)
-
-	#except CatalystError:
-	#	print
-	#	print "Catalyst aborting...."
-	#	sys.exit(2)
-	#except KeyError:
-	#	print "\nproblem with command line or spec file ( Key Error )"
-	#	print "Key: "+str(sys.exc_value)+" was not found"
+	#except:
 	#	print "Catalyst aborting...."
-	#	sys.exit(2)
-	#except UnboundLocalError:
-	#	print
-	#	print "UnboundLocalError: "+str(sys.exc_value)+" was not found"
 	#	raise
-	#	print
-	#	print "Catalyst aborting...."
 	#	sys.exit(2)
+


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

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

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-18 16:52 [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 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
2013-11-21  9:06 Brian Dolbec
2013-11-21  9:06 Brian Dolbec
2013-11-21  9:06 Brian Dolbec

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