View | Details | Raw Unified | Return to bug 328298
Collapse All | Expand All

(-)/usr/sbin/kiwi.bak (-1 / +13 lines)
Lines 104-109 Link Here
104
our $ListProfiles;      # lists the available profiles in image
104
our $ListProfiles;      # lists the available profiles in image
105
our $ForceNewRoot;      # force creation of new root directory
105
our $ForceNewRoot;      # force creation of new root directory
106
our $BaseRoot;          # use given path as base system
106
our $BaseRoot;          # use given path as base system
107
our $nocolor;		# do not used colored output (done/failed messages)
107
108
108
#============================================
109
#============================================
109
# Globals
110
# Globals
Lines 135-140 Link Here
135
	#------------------------------------------
136
	#------------------------------------------
136
	init();
137
	init();
137
138
139
	
140
	#==========================================
141
	# Check for nocolor option (doesn't make sense with LogFile set)
142
	#------------------------------------------
143
	if (defined $nocolor) {
144
		$kiwi -> info ("Switching off colored output\n");
145
		if (! $kiwi -> setColorOff ()) {
146
			my $code = kiwiExit (1); return $code;
147
		}
148
	}
149
138
	#==========================================
150
	#==========================================
139
	# Setup logging location
151
	# Setup logging location
140
	#------------------------------------------
152
	#------------------------------------------
Lines 144-150 Link Here
144
			my $code = kiwiExit (1); return $code;
156
			my $code = kiwiExit (1); return $code;
145
		}
157
		}
146
	}
158
	}
147
148
	#==========================================
159
	#==========================================
149
	# Handle ListProfiles option
160
	# Handle ListProfiles option
150
	#------------------------------------------
161
	#------------------------------------------
Lines 739-744 Link Here
739
		"force-new-root"        => \$ForceNewRoot,
750
		"force-new-root"        => \$ForceNewRoot,
740
		"base-root=s"           => \$BaseRoot,
751
		"base-root=s"           => \$BaseRoot,
741
		"help|h"                => \&usage,
752
		"help|h"                => \&usage,
753
		"nocolor"		=> \$nocolor,
742
		"<>"                    => \&usage
754
		"<>"                    => \&usage
743
	);
755
	);
744
	my $user = qx (whoami);
756
	my $user = qx (whoami);
(-)/usr/share/kiwi/modules/KIWILog.pm.bak (-6 / +18 lines)
Lines 189-195 Link Here
189
	# This is the green "done" flag
189
	# This is the green "done" flag
190
	# ---
190
	# ---
191
	my $this = shift;
191
	my $this = shift;
192
	if (! defined $this->{fileLog}) {
192
	if (! defined $this->{fileLog} && !defined $this->{nocolor}) {
193
	    $this -> doStat();
193
	    $this -> doStat();
194
		$this -> setOutputChannel();
194
		$this -> setOutputChannel();
195
		print "\033[1;32mdone\n";
195
		print "\033[1;32mdone\n";
Lines 214-220 Link Here
214
	# This is the red "failed" flag
214
	# This is the red "failed" flag
215
	# ---
215
	# ---
216
	my $this = shift;
216
	my $this = shift;
217
	if (! defined $this->{fileLog}) {
217
	if (! defined $this->{fileLog} && !defined $this->{nocolor}) {
218
		$this -> doStat();
218
		$this -> doStat();
219
		$this -> setOutputChannel();
219
		$this -> setOutputChannel();
220
		print "\033[1;31mfailed\n";
220
		print "\033[1;31mfailed\n";
Lines 239-245 Link Here
239
	# This is the yellow "skipped" flag
239
	# This is the yellow "skipped" flag
240
	# ---
240
	# ---
241
	my $this = shift;
241
	my $this = shift;
242
	if (! defined $this->{fileLog}) {
242
	if (! defined $this->{fileLog} && !defined $this->{nocolor}) {
243
		$this -> doStat();
243
		$this -> doStat();
244
		$this -> setOutputChannel();
244
		$this -> setOutputChannel();
245
		print "\033[1;33mskipped\n";
245
		print "\033[1;33mskipped\n";
Lines 268-274 Link Here
268
	if ($data > 100) {
268
	if ($data > 100) {
269
		$data = 100;
269
		$data = 100;
270
	}
270
	}
271
	if (! defined $this->{fileLog}) {
271
	if (! defined $this->{fileLog} && !defined $this->{nocolor}) {
272
		$this -> doStat();
272
		$this -> doStat();
273
		$this -> setOutputChannel();
273
		$this -> setOutputChannel();
274
		print "\033[1;32m($data%)";
274
		print "\033[1;32m($data%)";
Lines 287-293 Link Here
287
#------------------------------------------
287
#------------------------------------------
288
sub cursorOFF {
288
sub cursorOFF {
289
	my $this = shift;
289
	my $this = shift;
290
	if (! defined $this->{fileLog}) {
290
	if (! defined $this->{fileLog} && !defined $this->{nocolor}) {
291
		print "\033[?25l";
291
		print "\033[?25l";
292
	}
292
	}
293
}
293
}
Lines 297-303 Link Here
297
#------------------------------------------
297
#------------------------------------------
298
sub cursorON {
298
sub cursorON {
299
	my $this = shift;
299
	my $this = shift;
300
	if (! defined $this->{fileLog}) {
300
	if (! defined $this->{fileLog}  && !defined $this->{nocolor}) {
301
		print "\033[?25h";
301
		print "\033[?25h";
302
	}
302
	}
303
}
303
}
Lines 507-512 Link Here
507
}
507
}
508
508
509
#==========================================
509
#==========================================
510
# setColorOff
511
#------------------------------------------
512
sub setColorOff {
513
	# ...
514
	# switch off the colored output - do it by simulating output file
515
	# ---
516
	my $this = shift;
517
	$this->{nocolor} = 1;
518
	return $this;
519
}
520
521
#==========================================
510
# setRootLog
522
# setRootLog
511
#------------------------------------------
523
#------------------------------------------
512
sub setRootLog {
524
sub setRootLog {

Return to bug 328298