public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-catalyst] [patch] make catalyst less noisy
@ 2006-12-24 11:21 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2006-12-24 11:21 UTC (permalink / raw
  To: gentoo-catalyst


[-- Attachment #1.1: Type: text/plain, Size: 109 bytes --]

i've wrapped a bunch of the output in 'if verbose' to make the default output 
a lot less cluttered
-mike

[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]

[-- Attachment #2: catalyst-verbose.patch --]
[-- Type: text/x-diff, Size: 3648 bytes --]

Index: catalyst
===================================================================
RCS file: /var/cvsroot/gentoo/src/catalyst/catalyst,v
retrieving revision 1.162
diff -u -p -r1.162 catalyst
--- catalyst	2 Oct 2006 20:41:53 -0000	1.162
+++ catalyst	24 Dec 2006 11:19:10 -0000
@@ -86,51 +86,65 @@ def parse_config(myconfig):
 	# now, load up the values into conf_values so that we can use them
 	for x in confdefaults.keys():
 		if myconf.has_key(x):
-			print "Setting",x,"to config file value \""+myconf[x]+"\""
+			if verbose:
+				print "Setting",x,"to config file value \""+myconf[x]+"\""
 			conf_values[x]=myconf[x]
 		else:
-			print "Setting",x,"to default value \""+confdefaults[x]+"\""
+			if verbose:
+				print "Setting",x,"to default value \""+confdefaults[x]+"\""
 			conf_values[x]=confdefaults[x]
 
+	conf_values["sharedir"] = "/usr/local/gentoo/src/catalyst"
+
 	# parse out the rest of the options from the config file
 	if "ccache" in string.split(conf_values["options"]):
-		print "Compiler cache support enabled."
+		if verbose:
+			print "Compiler cache support enabled."
 		conf_values["CCACHE"]="1"
 
 	if "pkgcache" in string.split(conf_values["options"]):
-		print "Package cache support enabled."
+		if verbose:
+			print "Package cache support enabled."
 		conf_values["PKGCACHE"]="1"
 	
 	if "snapcache" in string.split(conf_values["options"]):
-		print "Snapshot cache support enabled."
+		if verbose:
+			print "Snapshot cache support enabled."
 		conf_values["SNAPCACHE"]="1"
 	
 	if "seedcache" in string.split(conf_values["options"]):
-		print "Seed cache support enabled."
+		if verbose:
+			print "Seed cache support enabled."
 		conf_values["SEEDCACHE"]="1"
 
 	if "kerncache" in string.split(conf_values["options"]):
-		print "Kernel cache support enabled."
+		if verbose:
+			print "Kernel cache support enabled."
 		conf_values["KERNCACHE"]="1"
 	
 	if "distcc" in string.split(conf_values["options"]):
-		print "Distcc support enabled."
+		if verbose:
+			print "Distcc support enabled."
 		conf_values["DISTCC"]="1"
 
 	if "autoresume" in string.split(conf_values["options"]):
-		print "Autoresuming support enabled."
+		if verbose:
+			print "Autoresuming support enabled."
 		conf_values["AUTORESUME"]="1"
 
 	if "purge" in string.split(conf_values["options"]):
-		print "Purge support enabled."
+		if verbose:
+			print "Purge support enabled."
 		conf_values["PURGE"]="1"
 	
 	if "clear-autoresume" in string.split(conf_values["options"]):
-		print "Cleaning autoresume flags support enabled."
+		if verbose:
+			print "Cleaning autoresume flags support enabled."
 		conf_values["CLEAR_AUTORESUME"]="1"
 	
 	if myconf.has_key("envscript"):
-		print "Envscript support enabled."
+		if verbose:
+			print "Envscript support enabled."
 		conf_values["ENVSCRIPT"]=myconf["envscript"]
 	
 	if myconf.has_key("digests"):
@@ -200,7 +214,6 @@ 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
 		print "!!! catalyst: This script requires root privileges to operate"
@@ -280,6 +293,7 @@ if __name__ == "__main__":
 				conf_values["FETCH"]="1"
 			
 		if o in ("-v", "--verbose"):
+			verbose = True
 			if len(sys.argv) < 3:
 				print "!!! catalyst: please specify one of either -f or -C\n"
 				usage()
@@ -316,6 +330,9 @@ if __name__ == "__main__":
 		usage()
 		sys.exit(2)
 
+	if verbose:
+		version()
+
 	# import configuration file and import our main module using those settings
 	parse_config(myconfig)
 	sys.path.append(conf_values["sharedir"]+"/modules")

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-24 11:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-24 11:21 [gentoo-catalyst] [patch] make catalyst less noisy Mike Frysinger

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