Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 14321 | Differences between
and this patch

Collapse All | Expand All

(-)a/bin/emerge (-10 / +24 lines)
Lines 20-26 try: Link Here
20
except KeyboardInterrupt:
20
except KeyboardInterrupt:
21
	sys.exit(1)
21
	sys.exit(1)
22
22
23
import os
23
import os, stat
24
os.environ["PORTAGE_CALLER"]="emerge"
24
os.environ["PORTAGE_CALLER"]="emerge"
25
sys.path = ["/usr/lib/portage/pym"]+sys.path
25
sys.path = ["/usr/lib/portage/pym"]+sys.path
26
26
Lines 2521-2535 def chk_updated_cfg_files(target_root, c Link Here
2521
		procount=0
2521
		procount=0
2522
		for x in config_protect:
2522
		for x in config_protect:
2523
			x = os.path.join(target_root, x.lstrip(os.path.sep))
2523
			x = os.path.join(target_root, x.lstrip(os.path.sep))
2524
			if os.path.isdir(x):
2524
			try:
2525
				a=commands.getstatusoutput("cd "+x+"; find . -iname '._cfg????_*'")
2525
				mymode = os.lstat(x).st_mode
2526
				if a[0]!=0:
2526
			except OSError:
2527
					print " "+red("*")+" error scanning",x
2527
				continue
2528
				else:
2528
			if stat.S_ISDIR(mymode):
2529
					files=string.split(a[1])
2529
				mycommand = "cd '%s'; find . -name '._cfg????_*'" % x
2530
					if files:
2530
			else:
2531
						procount=procount+1
2531
				mycommand = "cd '%s'; find . -maxdepth 1 -name '._cfg????_%s'" % \
2532
						print " "+yellow("* IMPORTANT:")+"",len(files),"config files in",x,"need updating."
2532
					os.path.split(x.rstrip(os.path.sep))
2533
			a = commands.getstatusoutput(mycommand)
2534
			if a[0] != 0:
2535
				print >> sys.stderr, " " + bad("*")+ " error scanning '%s'" % x
2536
			else:
2537
				files = a[1].split()
2538
				if files:
2539
					procount += 1
2540
					print colorize("WARN", " * IMPORTANT:"),
2541
					if stat.S_ISDIR(mymode):
2542
						 print "%d config files in '%s' need updating." % \
2543
							(len(files), x)
2544
					else:
2545
						 print "config file '%s' needs updating." % x
2546
2533
		if procount:
2547
		if procount:
2534
			#print " "+yellow("*")+" Type "+green("emerge --help config")+" to learn how to update config files."
2548
			#print " "+yellow("*")+" Type "+green("emerge --help config")+" to learn how to update config files."
2535
			print " "+yellow("*")+" Type "+green("emerge --help config")+" to learn how to update config files."
2549
			print " "+yellow("*")+" Type "+green("emerge --help config")+" to learn how to update config files."

Return to bug 14321