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

Collapse All | Expand All

(-)/usr/bin/emerge (+61 lines)
Lines 2832-2837 Link Here
2832
	unameout=commands.getstatusoutput("uname -mrp")[1]
2832
	unameout=commands.getstatusoutput("uname -mrp")[1]
2833
	print getportageversion()
2833
	print getportageversion()
2834
	print "================================================================="
2834
	print "================================================================="
2835
	print "                       System Settings"
2836
	print "================================================================="
2835
	print "System uname: "+unameout
2837
	print "System uname: "+unameout
2836
	if os.path.exists("/etc/gentoo-release"):
2838
	if os.path.exists("/etc/gentoo-release"):
2837
		os.system("cat /etc/gentoo-release")
2839
		os.system("cat /etc/gentoo-release")
Lines 2908-2913 Link Here
2908
			if "cvs_id_string" in dir(module):
2910
			if "cvs_id_string" in dir(module):
2909
				print "%s: %s" % (str(x), str(module.cvs_id_string))
2911
				print "%s: %s" % (str(x), str(module.cvs_id_string))
2910
2912
2913
	# See if we can find any packages installed matching the strings
2914
	# passed on the command line
2915
	mypkgs = []
2916
	for x in myfiles:
2917
		mypkgs = mypkgs + portage.db[portage.root]["vartree"].dbapi.match(x)
2918
2919
	# If some packages were found...
2920
	if mypkgs:
2921
		# Get our global settings (we only print stuff if it varies from
2922
		# the current config)
2923
		mydesiredvars = [ 'CHOST', 'CFLAGS', 'CXXFLAGS', 'USE' ]
2924
		mysettings = {}
2925
		for x in mydesiredvars:
2926
			if portage.settings.has_key(x):
2927
				mysettings["GLOBAL_" + x] = portage.settings[x]
2928
			else:
2929
				mysettings["GLOBAL_" + x] = None
2930
2931
		# Loop through each package
2932
		# Only print settings if they differ from global settings
2933
		diff_found = False
2934
		header_printed = False
2935
		for pkg in mypkgs:
2936
2937
			# Get the directory where the files are stored
2938
			prefix = os.path.join(portage.root, portage.VDB_PATH, pkg)
2939
2940
			# Get all package specific variables
2941
			tmp = portage.db[portage.root]["vartree"].dbapi.aux_get(pkg, mydesiredvars)
2942
			for i in range(len(mydesiredvars)):
2943
				mysettings[mydesiredvars[i]] = tmp[i]
2944
2945
				# If the package variable doesn't match the
2946
				# current global variable, something has changed
2947
				# so set diff_found so we know to print
2948
				if mysettings[mydesiredvars[i]] != mysettings["GLOBAL_" + mydesiredvars[i]]:
2949
					diff_found = True
2950
2951
			# If a difference was found, print the info for
2952
			# this package.
2953
			if diff_found:
2954
2955
				# If we have not yet printed the header, 
2956
				# print it now
2957
				if not header_printed:
2958
					print "================================================================="
2959
					print "                       Package Settings"
2960
					print "================================================================="
2961
					header_printed = True
2962
2963
				# Print package info
2964
				print "%s was built with the following:" % pkg
2965
				for x in mydesiredvars:
2966
					if mysettings[x] != mysettings["GLOBAL_" + x]:
2967
						print "%s=\"%s\"" % (x, mysettings[x])
2968
				print ""
2969
				diff_found = False
2970
2971
2911
# SEARCH action
2972
# SEARCH action
2912
elif "search"==myaction:
2973
elif "search"==myaction:
2913
	if not myfiles:
2974
	if not myfiles:

Return to bug 95741