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

Collapse All | Expand All

(-)a/pym/portage/package/ebuild/doebuild.py (-4 / +7 lines)
Lines 199-214 def _doebuild_path(settings, eapi=None): Link Here
199
	if portage_bin_path[0] != portage.const.PORTAGE_BIN_PATH:
199
	if portage_bin_path[0] != portage.const.PORTAGE_BIN_PATH:
200
		# Add a fallback path for restarting failed builds (bug 547086)
200
		# Add a fallback path for restarting failed builds (bug 547086)
201
		portage_bin_path.append(portage.const.PORTAGE_BIN_PATH)
201
		portage_bin_path.append(portage.const.PORTAGE_BIN_PATH)
202
	eprefix = portage.const.EPREFIX
203
	prerootpath = [x for x in settings.get("PREROOTPATH", "").split(":") if x]
202
	prerootpath = [x for x in settings.get("PREROOTPATH", "").split(":") if x]
204
	rootpath = [x for x in settings.get("ROOTPATH", "").split(":") if x]
203
	rootpath = [x for x in settings.get("ROOTPATH", "").split(":") if x]
205
	overrides = [x for x in settings.get(
204
	overrides = [x for x in settings.get(
206
		"__PORTAGE_TEST_PATH_OVERRIDE", "").split(":") if x]
205
		"__PORTAGE_TEST_PATH_OVERRIDE", "").split(":") if x]
207
206
208
	prefixes = []
207
	prefixes = []
209
	if eprefix:
208
	# tools in EPREFIX can only be executed when ROOT is /.
210
		prefixes.append(eprefix)
209
	if settings["ROOT"] == "/":
211
	prefixes.append("/")
210
		prefixes.append(settings["EPREFIX"])
211
	# settings["EPREFIX"] could be overridden during cross-eprefix
212
	if portage.const.EPREFIX != settings["EPREFIX"]:
213
		prefixes.append(portage.const.EPREFIX)
212
214
213
	path = overrides
215
	path = overrides
214
216
Lines 232-237 def _doebuild_path(settings, eapi=None): Link Here
232
	path.extend(prerootpath)
234
	path.extend(prerootpath)
233
235
234
	for prefix in prefixes:
236
	for prefix in prefixes:
237
		prefix = prefix if prefix else "/"
235
		for x in ("usr/local/sbin", "usr/local/bin", "usr/sbin", "usr/bin", "sbin", "bin"):
238
		for x in ("usr/local/sbin", "usr/local/bin", "usr/sbin", "usr/bin", "sbin", "bin"):
236
			path.append(os.path.join(prefix, x))
239
			path.append(os.path.join(prefix, x))
237
240

Return to bug 585986