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

Collapse All | Expand All

(-)/usr/bin/distcc-config (-6 / +23 lines)
Lines 73-83 Link Here
73
			print 'Configuring',path+file+'...'
73
			print 'Configuring',path+file+'...'
74
		os.chown(path+file,user,group)
74
		os.chown(path+file,user,group)
75
75
76
def installlinks(chost=''):
76
def installlinks(chost):
77
	path = '/usr/lib/distcc/bin/'
77
	for file in ['gcc', 'cc', 'c++', 'g++']:
78
	for file in ['gcc', 'cc', 'c++', 'g++']:
78
		path = '/usr/lib/distcc/bin/'
79
		file = chost + '-' + file
79
		if not chost == '':
80
			file = chost+'-'+file
81
		if os.path.exists('/usr/bin/'+file):
80
		if os.path.exists('/usr/bin/'+file):
82
			if verbose:
81
			if verbose:
83
				print 'Creating',path+file,'symlink...'
82
				print 'Creating',path+file,'symlink...'
Lines 86-91 Link Here
86
			else:
85
			else:
87
				if verbose:
86
				if verbose:
88
					print 'Already exists. Skipping...'
87
					print 'Already exists. Skipping...'
88
	for file in ['gcc', 'cc', 'c++', 'g++']:
89
		if os.path.exists('/usr/bin/' + file):
90
			if verbose:
91
				print 'Creating',path+file,'wrapper script...'
92
			if os.path.exists(path + file):
93
				if verbose:
94
					print 'File already exists...removing'
95
				os.unlink(path + file)
96
			try:
97
				tmpfile = file
98
				if file == "cc": tmpfile = "gcc"
99
				wrapper = open(path + file, "w")
100
				wrapper.write("#!/bin/bash\n\nexec " + path + chost + "-" + tmpfile + " \"@$\"\n")
101
				wrapper.close()
102
				os.chmod(path + file, 755)
103
				if verbose:
104
					print 'Wrapper script created successfully'
105
			except:
106
				print 'Could not create wrapper!!!'
89
107
90
def createdistccdir(dir):
108
def createdistccdir(dir):
91
	if not os.path.exists(dir):
109
	if not os.path.exists(dir):
Lines 150-158 Link Here
150
		group  = foobar[3]
168
		group  = foobar[3]
151
	
169
	
152
		if portage.settings.has_key('CHOST'):
170
		if portage.settings.has_key('CHOST'):
153
			chost portage.settings['CHOST']makeconf = open('/etc/make.conf', 'r').read()
171
			chost = portage.settings['CHOST']
154
		print 'Creating symlinks...'
172
		print 'Creating symlinks...'
155
		installlinks()
156
		installlinks(chost)
173
		installlinks(chost)
157
	
174
	
158
		print 'Checking permissions...'
175
		print 'Checking permissions...'

Return to bug 84942