public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-catalyst@gentoo.org
Subject: [gentoo-catalyst] [patch] make catalyst less noisy
Date: Sun, 24 Dec 2006 06:21:02 -0500	[thread overview]
Message-ID: <200612240621.03176.vapier@gentoo.org> (raw)


[-- 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")

                 reply	other threads:[~2006-12-24 11:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200612240621.03176.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gentoo-catalyst@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