public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: Re: [gentoo-catalyst] Catalyst tree move code changes. [1 of 4] now [1 of 2]
Date: Mon, 07 Jan 2013 23:27:37 -0800	[thread overview]
Message-ID: <1357630057.4289.17.camel@big_daddy.dol-sen.ca> (raw)
In-Reply-To: <1357522877.17120.9.camel@big_daddy.dol-sen.ca>

[-- Attachment #1: Type: text/plain, Size: 4558 bytes --]

On Sun, 2013-01-06 at 17:41 -0800, Brian Dolbec wrote:
> This is the first of some untested (but they compile without errors)
> patches to catalyst for the pending default tree location changes.
> 
> My current gentoo machine is somewhat limited in capability (memory
> shortage, only moderate cpu horespower) for doing proper testing.  But I
> will try and get it setup better to do some test runs for changes.
> 
> I can also push my catalyst git repo to my dev space for you to checkout
> and do some tests on if you like.
> 
> 

As requested.  Separated whitespace cleanup.

=====================

diff --git a/catalyst b/catalyst
index 3d31599..c77658a 100755
@@ -66,7 +66,7 @@ def parse_config(myconfig):
 		"portdir":"/usr/portage","options":"",\
 		"snapshot_cache":"/var/tmp/catalyst/snapshot_cache",\
 		"hash_function":"crc32"}
-		
+
 	# first, try the one passed (presumably from the cmdline)
 	if myconfig:
 		if os.path.exists(myconfig):
@@ -77,12 +77,12 @@ def parse_config(myconfig):
 			print "!!! catalyst: Could not use specified configuration file "+\
 				myconfig
 			sys.exit(1)
-	
+
 	# next, try the default location
 	elif os.path.exists("/etc/catalyst/catalyst.conf"):
 		print "Using default Catalyst configuration file, /etc/catalyst/catalyst.conf"
 		config_file="/etc/catalyst/catalyst.conf"
-	
+
 	# can't find a config file (we are screwed), so bail out
 	else:
 		print "!!! catalyst: Could not find a suitable configuration file"
@@ -93,11 +93,11 @@ def parse_config(myconfig):
 #		execfile(config_file, myconf, myconf)
 		myconfig = catalyst.config.ConfigParser(config_file)
 		myconf.update(myconfig.get_values())
-	
+
 	except:
 		print "!!! catalyst: Unable to parse configuration file, "+myconfig
 		sys.exit(1)
-	
+
 	# now, load up the values into conf_values so that we can use them
 	for x in confdefaults.keys():
 		if myconf.has_key(x):
@@ -208,9 +208,9 @@ def build_target(addlargs, targetmap):
 	try:
 		if not targetmap.has_key(addlargs["target"]):
 			raise CatalystError,"Target \""+addlargs["target"]+"\" not available."
-		
+
 		mytarget=targetmap[addlargs["target"]](conf_values, addlargs)
-	
+
 		mytarget.run()
 
 	except:
@@ -220,7 +220,7 @@ def build_target(addlargs, targetmap):
 
 if __name__ == "__main__":
 	targetmap={}
-	
+
 	version()
 	if os.getuid() != 0:
 		# catalyst cannot be run as a normal user due to chroots, mounts, etc
@@ -236,11 +236,11 @@ if __name__ == "__main__":
 	try:
 		opts,args = getopt.getopt(sys.argv[1:], "apPThvdc:C:f:FVs:", ["purge", "purgeonly", "purgetmponly", "help", "version", "debug",\
 			"clear-autoresume", "config=", "cli=", "file=", "fetch", "verbose","snapshot="])
-	
+
 	except getopt.GetoptError:
 		usage()
 		sys.exit(2)
-	
+
 	# defaults for commandline opts
 	debug=False
 	verbose=False
@@ -261,7 +261,7 @@ if __name__ == "__main__":
 		if o in ("-h", "--help"):
 			usage()
 			sys.exit(1)
-		
+
 		if o in ("-V", "--version"):
 			print "Catalyst version "+__version__
 			sys.exit(1)
@@ -279,14 +279,14 @@ if __name__ == "__main__":
 			while x < len(sys.argv):
 				mycmdline.append(sys.argv[x])
 				x=x+1
-			
+
 		if o in ("-f", "--file"):
 			run = True
 			myspecfile=a
 
 		if o in ("-F", "--fetchonly"):
 			conf_values["FETCH"]="1"
-			
+
 		if o in ("-v", "--verbose"):
 			conf_values["VERBOSE"]="1"
 
@@ -299,7 +299,7 @@ if __name__ == "__main__":
 				run = True
 				mycmdline.append("target=snapshot")
 				mycmdline.append("version_stamp="+a)
-		
+
 		if o in ("-p", "--purge"):
 			conf_values["PURGE"] = "1"
 
@@ -321,7 +321,7 @@ if __name__ == "__main__":
 	parse_config(myconfig)
 	sys.path.append(conf_values["sharedir"]+"/modules")
 	from catalyst_support import *
-	
+
 	# Start checking that digests are valid now that the hash_map was imported
 	# from catalyst_support
 	if conf_values.has_key("digests"):
@@ -365,11 +365,11 @@ if __name__ == "__main__":
 	targetmap=import_modules()
 
 	addlargs={}
-	
+
 	if myspecfile:
 		spec = catalyst.config.SpecParser(myspecfile)
 		addlargs.update(spec.get_values())
-	
+
 	if mycmdline:
 		try:
 			cmdline = catalyst.config.ConfigParser()
@@ -385,7 +385,7 @@ if __name__ == "__main__":
 	# everything is setup, so the build is a go
 	try:
 		build_target(addlargs, targetmap)
-			
+
 	except CatalystError:
 		print
 		print "Catalyst aborting...."


=====================
-- 
Brian Dolbec <dolsen@gentoo.org>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2013-01-08  7:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-07  1:41 [gentoo-catalyst] Catalyst tree move code changes. [1 of 4] Brian Dolbec
2013-01-08  7:27 ` Brian Dolbec [this message]
2013-01-08  7:29 ` [gentoo-catalyst] Catalyst tree move code changes. [1 of 4] now [2 of 2] Brian Dolbec
2013-01-08 18:10   ` Peter Stuge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357630057.4289.17.camel@big_daddy.dol-sen.ca \
    --to=dolsen@gentoo.org \
    --cc=gentoo-catalyst@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox