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

Collapse All | Expand All

(-)portage-2.0.51.19/bin/ebuild.sh (-1 / +20 lines)
Lines 548-553 src_unpack() { Link Here
548
	fi	
548
	fi	
549
}
549
}
550
550
551
src_preconfig() {
552
	echo "default preconfig"
553
	return `false`
554
}
555
551
src_compile() {
556
src_compile() {
552
	if [ -x ./configure ]; then
557
	if [ -x ./configure ]; then
553
		econf
558
		econf
Lines 685-690 dyn_unpack() { Link Here
685
	trap SIGINT SIGQUIT
690
	trap SIGINT SIGQUIT
686
}
691
}
687
692
693
dyn_preconfig() {
694
	echo ">>> Preconfiguring source..."
695
	cd ${S}
696
	local preconfigured = 1
697
	echo "some more stuff"
698
	src_preconfig && preconfigured=0 || preconfigured=1
699
700
	if [ preconfigured ]; then
701
		echo ">>> Source preconfigured."
702
	else
703
		echo ">>> Could not preconfigure the source."
704
	fi
705
}
706
688
dyn_clean() {
707
dyn_clean() {
689
	if [ "$USERLAND" == "BSD" ] && type -p chflags &>/dev/null; then
708
	if [ "$USERLAND" == "BSD" ] && type -p chflags &>/dev/null; then
690
		chflags -R noschg,nouchg,nosappnd,nouappnd,nosunlnk,nouunlnk \
709
		chflags -R noschg,nouchg,nosappnd,nouappnd,nosunlnk,nouunlnk \
Lines 1778-1784 for myarg in $*; do Link Here
1778
			set +x
1797
			set +x
1779
		fi
1798
		fi
1780
		;;
1799
		;;
1781
	unpack|compile|test|clean|install)
1800
	unpack|preconfig|compile|test|clean|install)
1782
		if [ "${SANDBOX_DISABLED="0"}" == "0" ]; then
1801
		if [ "${SANDBOX_DISABLED="0"}" == "0" ]; then
1783
			export SANDBOX_ON="1"
1802
			export SANDBOX_ON="1"
1784
		else
1803
		else
(-)portage-2.0.51.19/pym/portage.py (-5 / +15 lines)
Lines 2253-2261 def spawnebuild(mydo,actionmap,mysetting Link Here
2253
			retval=spawnebuild(actionmap[mydo]["dep"],actionmap,mysettings,debug,alwaysdep=alwaysdep,logfile=logfile)
2253
			retval=spawnebuild(actionmap[mydo]["dep"],actionmap,mysettings,debug,alwaysdep=alwaysdep,logfile=logfile)
2254
			if retval:
2254
			if retval:
2255
				return retval
2255
				return retval
2256
2257
	# Do not log for preconfig as it break interactivity.
2258
	if mydo=="preconfig":
2259
		logfile=None
2260
2256
	# spawn ebuild.sh
2261
	# spawn ebuild.sh
2257
	mycommand = EBUILD_SH_BINARY + " "
2262
	mycommand = EBUILD_SH_BINARY + " "
2258
	if selinux_enabled and ("sesandbox" in features) and (mydo in ["unpack","compile","test","install"]):
2263
	if selinux_enabled and ("sesandbox" in features) and (mydo in ["unpack","preconfig","compile","test","install"]):
2259
		con=selinux.getcontext()
2264
		con=selinux.getcontext()
2260
		con=string.replace(con,mysettings["PORTAGE_T"],mysettings["PORTAGE_SANDBOX_T"])
2265
		con=string.replace(con,mysettings["PORTAGE_T"],mysettings["PORTAGE_SANDBOX_T"])
2261
		selinux.setexec(con)
2266
		selinux.setexec(con)
Lines 2295-2301 def doebuild(myebuild,mydo,myroot,mysett Link Here
2295
2300
2296
	validcommands = ["help","clean","prerm","postrm","preinst","postinst",
2301
	validcommands = ["help","clean","prerm","postrm","preinst","postinst",
2297
	                "config","setup","depend","fetch","digest",
2302
	                "config","setup","depend","fetch","digest",
2298
	                "unpack","compile","test","install","rpm","qmerge","merge",
2303
	                "unpack","preconfig","compile","test","install","rpm","qmerge","merge",
2299
	                "package","unmerge", "manifest"]
2304
	                "package","unmerge", "manifest"]
2300
2305
2301
	if mydo not in validcommands:
2306
	if mydo not in validcommands:
Lines 2533-2539 def doebuild(myebuild,mydo,myroot,mysett Link Here
2533
			return unmerge(mysettings["CATEGORY"],mysettings["PF"],myroot,mysettings)
2538
			return unmerge(mysettings["CATEGORY"],mysettings["PF"],myroot,mysettings)
2534
2539
2535
	# if any of these are being called, handle them -- running them out of the sandbox -- and stop now.
2540
	# if any of these are being called, handle them -- running them out of the sandbox -- and stop now.
2536
	if mydo=="clean":
2541
	if mydo in ["clean","config"]:
2537
		logfile=None
2542
		logfile=None
2538
	if mydo in ["help","clean","setup"]:
2543
	if mydo in ["help","clean","setup"]:
2539
		return spawn(EBUILD_SH_BINARY+" "+mydo,mysettings,debug=debug,free=1,logfile=logfile)
2544
		return spawn(EBUILD_SH_BINARY+" "+mydo,mysettings,debug=debug,free=1,logfile=logfile)
Lines 2623-2635 def doebuild(myebuild,mydo,myroot,mysett Link Here
2623
			  "depend": {                 "args":(0,1)},         # sandbox  / portage
2628
			  "depend": {                 "args":(0,1)},         # sandbox  / portage
2624
			  "setup":  {                 "args":(1,0)},         # without  / root
2629
			  "setup":  {                 "args":(1,0)},         # without  / root
2625
			 "unpack":  {"dep":"setup",   "args":(0,1)},         # sandbox  / portage
2630
			 "unpack":  {"dep":"setup",   "args":(0,1)},         # sandbox  / portage
2626
			"compile":  {"dep":"unpack",  "args":(nosandbox,1)}, # optional / portage
2631
		  "preconfig":  {"dep":"unpack",  "args":(nosandbox,1)}, # optional / portage
2627
			   "test":  {"dep":"compile", "args":(nosandbox,1)}, # optional / portage
2632
			   "test":  {"dep":"compile", "args":(nosandbox,1)}, # optional / portage
2628
			"install":  {"dep":"test",    "args":(0,0)},         # sandbox  / root
2633
			"install":  {"dep":"test",    "args":(0,0)},         # sandbox  / root
2629
			    "rpm":  {"dep":"install", "args":(0,0)},         # sandbox  / root
2634
			    "rpm":  {"dep":"install", "args":(0,0)},         # sandbox  / root
2630
    	"package":  {"dep":"install", "args":(0,0)},         # sandbox  / root
2635
    	"package":  {"dep":"install", "args":(0,0)},         # sandbox  / root
2631
	}
2636
	}
2632
	
2637
2638
	if "preconfig" in mysettings["FEATURES"].split():
2639
		actionmap["compile"] =  {"dep":"preconfig",  "args":(nosandbox,1)} # optional / portage
2640
	else:
2641
		actionmap["compile"] =  {"dep":"unpack",  "args":(nosandbox,1)} # optional / portage
2642
2633
	if mydo in actionmap.keys():	
2643
	if mydo in actionmap.keys():	
2634
		if mydo=="package":
2644
		if mydo=="package":
2635
			for x in ["","/"+mysettings["CATEGORY"],"/All"]:
2645
			for x in ["","/"+mysettings["CATEGORY"],"/All"]:

Return to bug 99529