Michał Górny avatar Michał Górny committed 4476d67

Add a --quiet option to silence status messages.

As requested by Rick Farina (Zero_Chaos).

Comments (0)

Files changed (4)


 		help='Only print a list of the packages which were updated; do not call emerge to rebuild them.')
 	opt.add_option('-P', '--profile', action='store', dest='profile',
 		help='Configuration profile (config file section) to use (default: smart-live-rebuild)')
+	opt.add_option('-q', '--quiet', action='store_true', dest='quiet',
+		help='Do not output progress messages, just errors.')
 	opt.add_option('-Q', '--quickpkg', action='store_true', dest='quickpkg',
 		help='Call quickpkg to create binary backups of packages which are going to be updated.')
 	opt.add_option('-r', '--remote-only', action='store_true', dest='remote_only',


 			'pretend': 'False',
 			'profile': 'smart-live-rebuild',
 			'quickpkg': 'False',
+			'quiet': 'False',
 			'remote_only': 'False',
 			'setuid': str(pm_conf.userpriv_enabled),
 			'timeout': '0',


 def SmartLiveRebuild(opts, pm, cliargs = None):
 	if not opts.color:
+	if opts.quiet:
+		out.silence()
 	if opts.jobs <= 0:
 		out.err('The argument to --jobs option must be a positive integer.')


 				if isinstance(v, str) and v.startswith('\033'):
 					setattr(self, k, '')
+	def silence(self):
+		self.s1 = lambda x: None
+		self.s2 = lambda x: None
+		self.s3 = lambda x: None
 	def s1(self, msg):
 		self.out('%s*** %s%s\n' % (self.s1reset, msg, self.reset))
 		self._cur_header = None
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.