Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 233735
Collapse All | Expand All

(-)pym/portage/__init__.py (-9 / +11 lines)
Lines 5042-5048 Link Here
5042
	actionmap_deps={
5042
	actionmap_deps={
5043
	"setup":  [],
5043
	"setup":  [],
5044
	"unpack": ["setup"],
5044
	"unpack": ["setup"],
5045
	"compile":["unpack"],
5045
	"configure": ["unpack"],
5046
	"compile":["configure"],
5046
	"test":   ["compile"],
5047
	"test":   ["compile"],
5047
	"install":["test"],
5048
	"install":["test"],
5048
	"rpm":    ["install"],
5049
	"rpm":    ["install"],
Lines 5063-5069 Link Here
5063
	validcommands = ["help","clean","prerm","postrm","cleanrm","preinst","postinst",
5064
	validcommands = ["help","clean","prerm","postrm","cleanrm","preinst","postinst",
5064
	                "config", "info", "setup", "depend",
5065
	                "config", "info", "setup", "depend",
5065
	                "fetch", "fetchall", "digest",
5066
	                "fetch", "fetchall", "digest",
5066
	                "unpack","compile","test","install","rpm","qmerge","merge",
5067
	                "unpack", "configure", "compile","test","install","rpm","qmerge", "merge",
5067
	                "package","unmerge", "manifest"]
5068
	                "package","unmerge", "manifest"]
5068
5069
5069
	if mydo not in validcommands:
5070
	if mydo not in validcommands:
Lines 5617-5629 Link Here
5617
5618
5618
		# args are for the to spawn function
5619
		# args are for the to spawn function
5619
		actionmap = {
5620
		actionmap = {
5620
"setup":  {"cmd":ebuild_sh, "args":{"droppriv":0,        "free":1,         "sesandbox":0,         "fakeroot":0}},
5621
"setup":    {"cmd":ebuild_sh, "args":{"droppriv":0,        "free":1,         "sesandbox":0,         "fakeroot":0}},
5621
"unpack": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":0,         "sesandbox":sesandbox, "fakeroot":0}},
5622
"unpack":   {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":0,         "sesandbox":sesandbox, "fakeroot":0}},
5622
"compile":{"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}},
5623
"configure":{"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}},
5623
"test":   {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}},
5624
"compile":  {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}},
5624
"install":{"cmd":ebuild_sh, "args":{"droppriv":0,        "free":0,         "sesandbox":sesandbox, "fakeroot":fakeroot}},
5625
"test":     {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}},
5625
"rpm":    {"cmd":misc_sh,   "args":{"droppriv":0,        "free":0,         "sesandbox":0,         "fakeroot":fakeroot}},
5626
"install":  {"cmd":ebuild_sh, "args":{"droppriv":0,        "free":0,         "sesandbox":sesandbox, "fakeroot":fakeroot}},
5626
"package":{"cmd":misc_sh,   "args":{"droppriv":0,        "free":0,         "sesandbox":0,         "fakeroot":fakeroot}},
5627
"rpm":      {"cmd":misc_sh,   "args":{"droppriv":0,        "free":0,         "sesandbox":0,         "fakeroot":fakeroot}},
5628
"package":  {"cmd":misc_sh,   "args":{"droppriv":0,        "free":0,         "sesandbox":0,         "fakeroot":fakeroot}},
5627
		}
5629
		}
5628
5630
5629
		# merge the deps in so we have again a 'full' actionmap
5631
		# merge the deps in so we have again a 'full' actionmap
(-)pym/_emerge/__init__.py (-1 / +1 lines)
Lines 2587-2593 Link Here
2587
2587
2588
	__slots__ = ("pkg", "scheduler", "settings") + ("_tree",)
2588
	__slots__ = ("pkg", "scheduler", "settings") + ("_tree",)
2589
2589
2590
	_phases = ("compile", "test", "install")
2590
	_phases = ("configure", "compile", "test", "install")
2591
2591
2592
	_live_eclasses = frozenset([
2592
	_live_eclasses = frozenset([
2593
		"cvs",
2593
		"cvs",
(-)bin/ebuild (-1 / +1 lines)
Lines 182-188 Link Here
182
	tmpsettings.backup_changes("EBUILD_SKIP_MANIFEST")
182
	tmpsettings.backup_changes("EBUILD_SKIP_MANIFEST")
183
	portage._doebuild_manifest_exempt_depend += 1
183
	portage._doebuild_manifest_exempt_depend += 1
184
184
185
build_dir_phases = set(["setup", "unpack", "compile",
185
build_dir_phases = set(["setup", "unpack", "configure", "compile",
186
	"test", "install", "package", "rpm"])
186
	"test", "install", "package", "rpm"])
187
187
188
def stale_env_warning():
188
def stale_env_warning():
(-)bin/isolated-functions.sh (-4 / +6 lines)
Lines 499-510 Link Here
499
			best_version use_with use_enable register_die_hook check_KV \
499
			best_version use_with use_enable register_die_hook check_KV \
500
			keepdir unpack strip_duplicate_slashes econf einstall \
500
			keepdir unpack strip_duplicate_slashes econf einstall \
501
			dyn_setup dyn_unpack dyn_clean into insinto exeinto docinto \
501
			dyn_setup dyn_unpack dyn_clean into insinto exeinto docinto \
502
			insopts diropts exeopts libopts abort_handler abort_compile \
502
			insopts diropts exeopts libopts abort_handler abort_configure \
503
			abort_test abort_install dyn_compile dyn_test dyn_install \
503
			abort_compile abort_test abort_install default_pkg_nofetch \
504
			default_src_unpack default_src_configure default_src_compile \
505
			default_src_test dyn_configure dyn_compile dyn_test dyn_install \
504
			dyn_preinst dyn_help debug-print debug-print-function \
506
			dyn_preinst dyn_help debug-print debug-print-function \
505
			debug-print-section inherit EXPORT_FUNCTIONS newdepend newrdepend \
507
			debug-print-section inherit EXPORT_FUNCTIONS newdepend newrdepend \
506
			newpdepend do_newdepend remove_path_entry \
508
			newpdepend do_newdepend remove_path_entry save_ebuild_env \
507
			save_ebuild_env filter_readonly_variables preprocess_ebuild_env \
509
			filter_readonly_variables preprocess_ebuild_env \
508
			source_all_bashrcs ebuild_phase ebuild_phase_with_hooks \
510
			source_all_bashrcs ebuild_phase ebuild_phase_with_hooks \
509
			${QA_INTERCEPTORS}
511
			${QA_INTERCEPTORS}
510
512
(-)bin/ebuild.sh (-19 / +127 lines)
Lines 583-589 Link Here
583
	fi
583
	fi
584
}
584
}
585
585
586
pkg_nofetch() {
586
default_pkg_nofetch() {
587
	[ -z "${SRC_URI}" ] && return
587
	[ -z "${SRC_URI}" ] && return
588
588
589
	echo "!!! The following are listed in SRC_URI for ${PN}:"
589
	echo "!!! The following are listed in SRC_URI for ${PN}:"
Lines 593-614 Link Here
593
	done
593
	done
594
}
594
}
595
595
596
src_unpack() {
596
default_src_unpack() {
597
	[[ -n ${A} ]] && unpack ${A}
597
	[[ -n ${A} ]] && unpack ${A}
598
}
598
}
599
599
600
src_compile() {
600
default_src_configure() {
601
	if [ "${EAPI:-0}" == 0 ] ; then
601
	if [ "${EAPI:-0}" == 0 ] ; then
602
		[ -x ./configure ] && econf
602
		[ -x ./configure ] && econf
603
	elif [ -x "${ECONF_SOURCE:-.}/configure" ] ; then
603
	elif [ -x "${ECONF_SOURCE:-.}/configure" ] ; then
604
		econf
604
		econf
605
	fi
605
	fi
606
}
607
608
default_src_compile() {
606
	if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
609
	if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
607
		emake || die "emake failed"
610
		emake || die "emake failed"
608
	fi
611
	fi
609
}
612
}
610
613
611
src_test() {
614
default_src_test() {
612
	if emake -j1 check -n &> /dev/null; then
615
	if emake -j1 check -n &> /dev/null; then
613
		vecho ">>> Test phase [check]: ${CATEGORY}/${PF}"
616
		vecho ">>> Test phase [check]: ${CATEGORY}/${PF}"
614
		if ! emake -j1 check; then
617
		if ! emake -j1 check; then
Lines 626-631 Link Here
626
	fi
629
	fi
627
}
630
}
628
631
632
pkg_nofetch() {
633
	default_pkg_nofetch
634
}
635
636
src_unpack() {
637
	default_src_unpack
638
}
639
640
src_configure() {
641
	default_src_configure
642
}
643
644
src_compile() {
645
	if [[ "${EAPI:-0}" == [01] ]] ; then
646
		default_src_configure
647
	fi
648
	default_src_compile
649
}
650
651
src_test() {
652
	default_src_test
653
}
654
629
ebuild_phase() {
655
ebuild_phase() {
630
	[ "$(type -t ${1})" == "function" ] && qa_call ${1}
656
	[ "$(type -t ${1})" == "function" ] && qa_call ${1}
631
}
657
}
Lines 822-827 Link Here
822
	trap SIGINT SIGQUIT
848
	trap SIGINT SIGQUIT
823
}
849
}
824
850
851
abort_configure() {
852
	abort_handler "src_configure" $1
853
	rm -f "${PORTAGE_BUILDDIR}/.configured"
854
	exit 1
855
}
856
825
abort_compile() {
857
abort_compile() {
826
	abort_handler "src_compile" $1
858
	abort_handler "src_compile" $1
827
	rm -f "${PORTAGE_BUILDDIR}/.compiled"
859
	rm -f "${PORTAGE_BUILDDIR}/.compiled"
Lines 840-845 Link Here
840
	exit 1
872
	exit 1
841
}
873
}
842
874
875
dyn_configure() {
876
	if [[ "${EAPI:-0}" != [01] ]] ; then
877
		trap "abort_configure" SIGINT SIGQUIT
878
879
		[ "$(type -t pre_src_configure)" == "function" ] && qa_call pre_src_configure
880
881
		[ "${CFLAGS-unset}"      != "unset" ] && export CFLAGS
882
		[ "${CXXFLAGS-unset}"    != "unset" ] && export CXXFLAGS
883
		[ "${LIBCFLAGS-unset}"   != "unset" ] && export LIBCFLAGS
884
		[ "${LIBCXXFLAGS-unset}" != "unset" ] && export LIBCXXFLAGS
885
		[ "${LDFLAGS-unset}"     != "unset" ] && export LDFLAGS
886
		[ "${ASFLAGS-unset}"     != "unset" ] && export ASFLAGS
887
888
		LIBDIR_VAR="LIBDIR_${ABI}"
889
		if [ -z "${PKG_CONFIG_PATH}" -a -n "${ABI}" -a -n "${!LIBDIR_VAR}" ]; then
890
			export PKG_CONFIG_PATH="/usr/${!LIBDIR_VAR}/pkgconfig"
891
		fi
892
		unset LIBDIR_VAR
893
894
		if hasq noauto $FEATURES && [ ! -f ${PORTAGE_BUILDDIR}/.unpacked ]; then
895
			echo
896
			echo "!!! We apparently haven't unpacked... This is probably not what you"
897
			echo "!!! want to be doing... You are using FEATURES=noauto so I'll assume"
898
			echo "!!! that you know what you are doing... You have 5 seconds to abort..."
899
			echo
900
901
			local x
902
			for x in 1 2 3 4 5 6 7 8; do
903
				echo -ne "\a"
904
				LC_ALL=C sleep 0.25
905
			done
906
907
			sleep 3
908
		fi
909
910
		local srcdir=${PORTAGE_BUILDDIR}
911
		cd "${PORTAGE_BUILDDIR}"
912
		if [ ! -e "build-info" ]; then
913
			mkdir build-info
914
		fi
915
		cp "${EBUILD}" "build-info/${PF}.ebuild"
916
917
		if [[ ${PORTAGE_BUILDDIR}/.configured -nt ${WORKDIR} ]] ; then
918
			vecho ">>> It appears that '${PF}' is already configured; skipping."
919
			vecho ">>> Remove '${PORTAGE_BUILDDIR}/.configured' to force configuration."
920
			trap SIGINT SIGQUIT
921
			[ "$(type -t post_src_configure)" == "function" ] && qa_call post_src_configure
922
			return
923
		fi
924
		if [ -d "${S}" ]; then
925
			srcdir=${S}
926
		else
927
			srcdir=${WORKDIR}
928
		fi
929
		cd "${srcdir}"
930
		#our custom version of libtool uses $S and $D to fix
931
		#invalid paths in .la files
932
		export S D
933
		#some packages use an alternative to $S to build in, cause
934
		#our libtool to create problematic .la files
935
		export PWORKDIR="$WORKDIR"
936
		vecho ">>> Configuring source in ${srcdir} ..."
937
		ebuild_phase src_configure
938
		vecho ">>> Source configured."
939
		#|| abort_configure "fail"
940
		cd "${PORTAGE_BUILDDIR}"
941
		touch .configured
942
		[ "$(type -t post_src_configure)" == "function" ] && qa_call post_src_configure
943
944
		trap SIGINT SIGQUIT
945
	fi
946
}
947
843
dyn_compile() {
948
dyn_compile() {
844
	trap "abort_compile" SIGINT SIGQUIT
949
	trap "abort_compile" SIGINT SIGQUIT
845
950
Lines 864-883 Link Here
864
	fi
969
	fi
865
	unset LIBDIR_VAR
970
	unset LIBDIR_VAR
866
971
867
	if hasq noauto $FEATURES && [ ! -f ${PORTAGE_BUILDDIR}/.unpacked ]; then
972
	if [[ "${EAPI:-0}" == [01] ]] ; then
868
		echo
973
		if hasq noauto $FEATURES && [ ! -f ${PORTAGE_BUILDDIR}/.unpacked ]; then
869
		echo "!!! We apparently haven't unpacked... This is probably not what you"
974
			echo
870
		echo "!!! want to be doing... You are using FEATURES=noauto so I'll assume"
975
			echo "!!! We apparently haven't unpacked... This is probably not what you"
871
		echo "!!! that you know what you are doing... You have 5 seconds to abort..."
976
			echo "!!! want to be doing... You are using FEATURES=noauto so I'll assume"
872
		echo
977
			echo "!!! that you know what you are doing... You have 5 seconds to abort..."
978
			echo
873
979
874
		local x
980
			local x
875
		for x in 1 2 3 4 5 6 7 8; do
981
			for x in 1 2 3 4 5 6 7 8; do
876
			echo -ne "\a"
982
				echo -ne "\a"
877
			LC_ALL=C sleep 0.25
983
				LC_ALL=C sleep 0.25
878
		done
984
			done
879
985
880
		sleep 3
986
			sleep 3
987
		fi
881
	fi
988
	fi
882
989
883
	local srcdir=${PORTAGE_BUILDDIR}
990
	local srcdir=${PORTAGE_BUILDDIR}
Lines 1059-1066 Link Here
1059
	echo "  digest      : create a manifest file for the package"
1166
	echo "  digest      : create a manifest file for the package"
1060
	echo "  manifest    : create a manifest file for the package"
1167
	echo "  manifest    : create a manifest file for the package"
1061
	echo "  unpack      : unpack/patch sources (auto-fetch if needed)"
1168
	echo "  unpack      : unpack/patch sources (auto-fetch if needed)"
1062
	echo "  compile     : compile sources (auto-fetch/unpack if needed)"
1169
	echo "  configure   : configure sources (auto-fetch/unpack if needed)"
1063
	echo "  test        : test package (auto-fetch/unpack/compile if needed)"
1170
	echo "  compile     : compile sources (auto-fetch/unpack/configure if needed)"
1171
	echo "  test        : test package (auto-fetch/unpack/configure/compile if needed)"
1064
	echo "  preinst     : execute pre-install instructions"
1172
	echo "  preinst     : execute pre-install instructions"
1065
	echo "  postinst    : execute post-install instructions"
1173
	echo "  postinst    : execute post-install instructions"
1066
	echo "  install     : install the package to the temporary install directory"
1174
	echo "  install     : install the package to the temporary install directory"
Lines 1786-1792 Link Here
1786
			)
1894
			)
1787
		fi
1895
		fi
1788
		;;
1896
		;;
1789
	unpack|compile|test|clean|install)
1897
	unpack|configure|compile|test|clean|install)
1790
		if [ "${SANDBOX_DISABLED="0"}" == "0" ]; then
1898
		if [ "${SANDBOX_DISABLED="0"}" == "0" ]; then
1791
			export SANDBOX_ON="1"
1899
			export SANDBOX_ON="1"
1792
		else
1900
		else

Return to bug 233735