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

Collapse All | Expand All

(-)ebuild.sh (-76 / +286 lines)
Lines 11-19 if [ ! -z "${PORTAGE_GPG_DIR}" ]; then Link Here
11
	SANDBOX_PREDICT="${SANDBOX_PREDICT}:${PORTAGE_GPG_DIR}"
11
	SANDBOX_PREDICT="${SANDBOX_PREDICT}:${PORTAGE_GPG_DIR}"
12
fi
12
fi
13
13
14
if [ "$*" != "depend" ] && [ "$*" != "clean" ] && [ "$*" != "nofetch" ]; then
14
if [ "$*" != "depend" ] && [ "$*" != "clean" ] && [ "$*" != "nofetch" ]; then
15
	# Cleanup if we were killed in the previous run...
16
	if [ -f "${BUILDDIR}/.abi" ]; then
17
		abi=$(cat ${BUILDDIR}/.abi)
18
		if [ -d "${WORKDIR}" ]; then
19
			mv ${WORKDIR} ${WORKDIR}.${abi} || die "IO Failure -- Unable to mv work work.${abi}"
20
		fi
21
		rm -rf ${BUILDDIR}/.abi || die "IO Failure -- Unable to 'rm .abi'"
22
		unset abi
23
	fi
24
15
	if [ -f "${T}/environment" ]; then
25
	if [ -f "${T}/environment" ]; then
26
		# restore_env isn't set yet, so we just source it for now.
27
		# Once this code is rearanged so the functions are defined
28
		# before this code is executed, we can just do restore_env
29
		# here.
16
		source "${T}/environment" &>/dev/null
30
		source "${T}/environment" &>/dev/null
17
	fi
31
	fi
18
fi
32
fi
19
33
Lines 614-665 dyn_setup() Link Here
614
	fi
628
	fi
615
	pkg_setup
629
	pkg_setup
616
}
630
}
617
631
632
# Filter which environment variables to save/restore.
633
select_saved_vars() {
634
	egrep -v "^(LD_PRELOAD|SANDBOX_|PORTAGE_|DISTCC_|CCACHE_|current_vars|target_vars|var|file)"
635
}
636
637
# We need to save/restore the environment for each ABI we are installing for separately
638
save_env() {
639
	local file
640
	if [ "$#" = "1" ]; then
641
		file="${T}/environment.${1}"
642
	else
643
		file="${T}/environment"
644
	fi
645
646
	local oldumask=$(umask)
647
	umask 002
648
	set | select_saved_vars >  ${file} || die "Unable to save environment settings."
649
	export -p | sed 's:declare -r\{0,1\}x ::' | select_saved_vars | sed 's:^:declare -x :' >> ${file} || die "Unable to save environment settings."
650
	chown portage:portage ${file} &>/dev/null
651
	chmod g+w ${file} &>/dev/null
652
	umask ${oldumask}
653
}
654
655
restore_env() {
656
	local file
657
	if [ "$#" = "1" -a -f "${T}/environment.${1}" ]; then
658
		file="${T}/environment.${1}"
659
	elif [ -f "${T}/environment" ]; then
660
		file="${T}/environment"
661
	else
662
		return
663
	fi
664
665
	local current_vars=$(set | egrep '^[_A-Za-z0-9]+=' | cut -f1 -d= | select_saved_vars)
666
	local target_vars=$(cat ${file} | egrep '^[_A-Za-z0-9]+=' | cut -f1 -d= | select_saved_vars)
667
668
	# OPTIMIZE: We should take advantage of the fact that they're both ordered lists
669
	for var in ${current_vars}; do
670
		if ! hasq ${var} ${target_vars}; then
671
			# Redirect to /dev/null so we don't get spam'd about
672
			# any read-only variables.
673
			echo ">>> Unsetting: ${var}=${!var}"
674
			unset ${var} &>/dev/null
675
		fi
676
	done
677
678
	source ${file} &>/dev/null || die "IO Failure in restore_env"
679
}
680
681
set_abi() {
682
	if [ "$#" != "1" ]; then
683
		die "set_abi needs to be given the ABI to use."
684
	fi
685
686
	local abi=${1}
687
688
	if [ -d "${WORKDIR}" ]; then
689
		unset_abi
690
	else
691
		save_env
692
	fi
693
	restore_env ${abi}
694
695
	if [ -d "${WORKDIR}.${abi}" ]; then
696
		# If it doesn't exist, then we're making it soon in dyn_unpack
697
		mv ${WORKDIR}.${abi} ${WORKDIR} || die "IO Failure -- Failed to 'mv work.${abi} work'"
698
	fi
699
700
	echo "${abi}" > ${BUILDDIR}/.abi || die "IO Failure -- Failed to create .abi."
701
	echo ">>> ABI=${abi}"
702
703
	# Export variables we need for toolchain
704
	export ABI="${abi}"
705
706
	local VAR
707
	VAR="CFLAGS_${ABI}"
708
	[ -n "${!VAR}" ] && eval export ${VAR}
709
	VAR="ASFLAGS_${ABI}"
710
	[ -n "${!VAR}" ] && eval export ${VAR}
711
}
712
713
unset_abi() {
714
	if [ -f "${BUILDDIR}/.abi" ]; then
715
		local abi=$(cat ${BUILDDIR}/.abi)
716
		[ ! -d "${WORKDIR}" ] && die "unset_abi: .abi present (${abi}) but workdir not present."
717
718
		save_env ${abi}
719
		restore_env
720
721
		mv ${WORKDIR} ${WORKDIR}.${abi} || die "IO Failure -- Failed to 'mv work work.${abi}'."
722
		rm -rf ${BUILDDIR}/.abi || die "IO Failure -- Failed to 'rm -rf .abi'."
723
	fi
724
}
725
726
get_abi_order() {
727
	local order=""
728
729
	if ! hasq multilib-pkg ${FEATURES}; then
730
		order="NOMULTILIB"
731
	elif ! hasq multilib-pkg ${RESTRICT}; then
732
		order="${DEFAULT_ABI}"
733
	else
734
		for x in ${MULTILIB_ABIS}; do
735
			if [ "${x}" != "${DEFAULT_ABI}" ]; then
736
				hasq ${x} ${ABI_DENY} || ordera="${ordera} ${x}"
737
			fi
738
		done
739
		hasq ${DEFAULT_ABI} ${ABI_DENY} || order="${ordera} ${DEFAULT_ABI}"
740
741
		if [ -n "${ABI_ALLOW}" ]; then
742
			local ordera=""
743
			for x in ${order}; do
744
				if hasq ${x} ${ABI_ALLOW}; then
745
					ordera="${ordera} ${x}"
746
				fi
747
			done
748
			order="${ordera}"
749
		fi
750
	fi
751
752
	if [ -z "${order}" ]; then
753
		die "The ABI list is empty.  Are you using a proper multilib profile?  Perhaps your USE flags or MULTILIB_ABIS are too restrictive for this package."
754
	fi
755
756
	echo ${order}
757
}
758
618
dyn_unpack() {
759
dyn_unpack() {
619
	trap "abort_unpack" SIGINT SIGQUIT
760
	trap "abort_unpack" SIGINT SIGQUIT
620
	local newstuff="no"
761
	local newstuff="no"
621
	if [ -e "${WORKDIR}" ]; then
762
622
		local x
763
	for ABI in $(get_abi_order); do
623
		local checkme
764
		if [ "${ABI}" = "NOMULTILIB" ]; then
624
		for x in ${AA}; do
765
			unset ABI
625
			echo ">>> Checking ${x}'s mtime..."
766
		else
626
			if [ "${DISTDIR}/${x}" -nt "${WORKDIR}" ]; then
767
			set_abi ${ABI}
627
				echo ">>> ${x} has been updated; recreating WORKDIR..."
768
		fi
769
		if [ -e "${WORKDIR}" ]; then
770
			local x
771
			local checkme
772
			for x in ${AA}; do
773
				echo ">>> Checking ${x}'s mtime..."
774
				if [ "${DISTDIR}/${x}" -nt "${WORKDIR}" ]; then
775
					echo ">>> ${x} has been updated; recreating WORKDIR..."
776
					newstuff="yes"
777
					rm -rf "${WORKDIR}"
778
					break
779
				fi
780
			done
781
			if [ "${EBUILD}" -nt "${WORKDIR}" ]; then
782
				echo ">>> ${EBUILD} has been updated; recreating WORKDIR..."
783
				newstuff="yes"
784
				rm -rf "${WORKDIR}"
785
			elif [ ! -f "${BUILDDIR}/.unpacked" ]; then
786
				echo ">>> Not marked as unpacked; recreating WORKDIR..."
628
				newstuff="yes"
787
				newstuff="yes"
629
				rm -rf "${WORKDIR}"
788
				rm -rf "${WORKDIR}"
630
				break
631
			fi
789
			fi
632
		done
633
		if [ "${EBUILD}" -nt "${WORKDIR}" ]; then
634
			echo ">>> ${EBUILD} has been updated; recreating WORKDIR..."
635
			newstuff="yes"
636
			rm -rf "${WORKDIR}"
637
		elif [ ! -f "${BUILDDIR}/.unpacked" ]; then
638
			echo ">>> Not marked as unpacked; recreating WORKDIR..."
639
			newstuff="yes"
640
			rm -rf "${WORKDIR}"
641
		fi
790
		fi
642
	fi
791
		if [ -e "${WORKDIR}" ]; then
643
	if [ -e "${WORKDIR}" ]; then
792
			if [ "${newstuff}" == "no" ]; then
644
		if [ "$newstuff" == "no" ]; then
793
				echo ">>> WORKDIR is up-to-date, keeping..."
645
			echo ">>> WORKDIR is up-to-date, keeping..."
794
				unset_abi
646
			return 0
795
				continue
796
			fi
647
		fi
797
		fi
648
	fi
798
649
	
799
		install -m0700 -d "${WORKDIR}" || die "Failed to create dir '${WORKDIR}'"
650
	install -m0700 -d "${WORKDIR}" || die "Failed to create dir '${WORKDIR}'"
800
		[ -d "${WORKDIR}" ] && cd "${WORKDIR}"
651
	[ -d "$WORKDIR" ] && cd "${WORKDIR}"
801
		echo ">>> Unpacking source..."
652
	echo ">>> Unpacking source..."
802
		src_unpack
653
	src_unpack
803
		unset_abi
804
	done
805
	unset ABI
654
	touch "${BUILDDIR}/.unpacked" || die "IO Failure -- Failed 'touch .unpacked' in BUILDIR"
806
	touch "${BUILDDIR}/.unpacked" || die "IO Failure -- Failed 'touch .unpacked' in BUILDIR"
655
	echo ">>> Source unpacked."
807
	echo ">>> Source unpacked."
656
	cd "$BUILDDIR"
808
	cd "${BUILDDIR}"
657
	trap SIGINT SIGQUIT
809
	trap SIGINT SIGQUIT
658
}
810
}
659
811
660
dyn_clean() {
812
dyn_clean() {
661
	if [ "$USERLAND" == "BSD" ] && type -p chflags &>/dev/null; then
813
	if [ "${USERLAND}" == "BSD" ] && type -p chflags &>/dev/null; then
662
		chflags -R noschg,nouchg,nosappnd,nouappnd,nosunlnk,nouunlnk \
814
		chflags -R noschg,nouchg,nosappnd,nouappnd,nosunlnk,nouunlnk \
663
			"${BUILDDIR}"
815
			"${BUILDDIR}"
664
	fi
816
	fi
665
817
Lines 671-683 dyn_clean() { Link Here
671
		mv "${T}/environment" "${T}/environment.keeptemp"
823
		mv "${T}/environment" "${T}/environment.keeptemp"
672
	fi
824
	fi
673
825
674
	if ! hasq keepwork $FEATURES; then
826
	if ! hasq keepwork $FEATURES; then
675
		rm -rf "${BUILDDIR}/.compiled"
827
		rm -rf "${BUILDDIR}/.abi"
828
		rm -rf "${BUILDDIR}/.compiled*"
676
		rm -rf "${BUILDDIR}/.unpacked"
829
		rm -rf "${BUILDDIR}/.unpacked"
677
		rm -rf "${BUILDDIR}/.installed"
830
		rm -rf "${BUILDDIR}/.installed"
678
		rm -rf "${BUILDDIR}/build-info"
831
		rm -rf "${BUILDDIR}/build-info"
679
		rm -rf "${WORKDIR}"
832
		rm -rf "${WORKDIR}*"
680
	fi
833
	fi
681
834
682
	if [ -f "${BUILDDIR}/.unpacked" ]; then
835
	if [ -f "${BUILDDIR}/.unpacked" ]; then
683
		find "${BUILDDIR}" -type d ! -regex "^${WORKDIR}" | sort -r | tr "\n" "\0" | $XARGS -0 rmdir &>/dev/null
836
		find "${BUILDDIR}" -type d ! -regex "^${WORKDIR}" | sort -r | tr "\n" "\0" | $XARGS -0 rmdir &>/dev/null
Lines 793-807 abort_handler() { Link Here
793
946
794
abort_compile() {
947
abort_compile() {
795
	abort_handler "src_compile" $1
948
	abort_handler "src_compile" $1
796
	rm -f "${BUILDDIR}/.compiled"
949
	rm -f "${BUILDDIR}/.compiled"
950
	[ -n "${ABI}" ] && rm -f "${BUILDDIR}/.compiled.${ABI}"
797
	exit 1
951
	exit 1
798
}
952
}
799
953
800
abort_unpack() {
954
abort_unpack() {
801
	abort_handler "src_unpack" $1
955
	abort_handler "src_unpack" $1
802
	rm -f "${BUILDDIR}/.unpacked"
956
	rm -f "${BUILDDIR}/.unpacked"
803
	rm -rf "${BUILDDIR}/work"
957
	rm -rf "${BUILDDIR}/work*"
804
	exit 1
958
	exit 1
805
}
959
}
806
960
807
abort_package() {
961
abort_package() {
Lines 824-844 abort_install() { Link Here
824
}
978
}
825
979
826
dyn_compile() {
980
dyn_compile() {
827
	trap "abort_compile" SIGINT SIGQUIT
981
	trap "abort_compile" SIGINT SIGQUIT
828
	[ "${CFLAGS-unset}"      != "unset" ] && export CFLAGS
829
	[ "${CXXFLAGS-unset}"    != "unset" ] && export CXXFLAGS
830
	[ "${LIBCFLAGS-unset}"   != "unset" ] && export LIBCFLAGS
831
	[ "${LIBCXXFLAGS-unset}" != "unset" ] && export LIBCXXFLAGS
832
	[ "${LDFLAGS-unset}"     != "unset" ] && export LDFLAGS
833
	[ "${ASFLAGS-unset}"     != "unset" ] && export ASFLAGS
834
835
	[ "${CCACHE_DIR-unset}"  != "unset" ] && export CCACHE_DIR
836
	[ "${CCACHE_SIZE-unset}" != "unset" ] && export CCACHE_SIZE
837
838
	[ "${DISTCC_DIR-unset}"  == "unset" ] && export DISTCC_DIR="${PORTAGE_TMPDIR}/.distcc"
839
	[ ! -z "${DISTCC_DIR}" ] && addwrite "${DISTCC_DIR}"
840
841
	if hasq noauto $FEATURES &>/dev/null && [ ! -f ${BUILDDIR}/.unpacked ]; then
982
	if hasq noauto $FEATURES &>/dev/null && [ ! -f ${BUILDDIR}/.unpacked ]; then
842
		echo
983
		echo
843
		echo "!!! We apparently haven't unpacked... This is probably not what you"
984
		echo "!!! We apparently haven't unpacked... This is probably not what you"
844
		echo "!!! want to be doing... You are using FEATURES=noauto so I'll assume"
985
		echo "!!! want to be doing... You are using FEATURES=noauto so I'll assume"
Lines 862-888 dyn_compile() { Link Here
862
		mkdir build-info
1003
		mkdir build-info
863
	fi
1004
	fi
864
	cp "${EBUILD}" "build-info/${PF}.ebuild"
1005
	cp "${EBUILD}" "build-info/${PF}.ebuild"
865
	
1006
	
866
	if [ ${BUILDDIR}/.compiled -nt "${WORKDIR}" ]; then
1007
	if [ "$(get_abi_order)" = "NOMULTILIB" -a \
1008
	      ${BUILDDIR}/.compiled -nt "${WORKDIR}" ]; then
867
		echo ">>> It appears that ${PN} is already compiled; skipping."
1009
		echo ">>> It appears that ${PN} is already compiled; skipping."
868
		echo ">>> (clean to force compilation)"
1010
		echo ">>> (clean to force compilation)"
869
		trap SIGINT SIGQUIT
1011
		trap SIGINT SIGQUIT
870
		return
1012
		return
871
	fi
1013
	fi
872
	if [ -d "${S}" ]; then
1014
873
		cd "${S}"
1015
	for ABI in $(get_abi_order); do
874
	fi
1016
		if [ "${ABI}" = "NOMULTILIB" ]; then
875
	#our custom version of libtool uses $S and $D to fix
1017
			unset ABI
876
	#invalid paths in .la files
1018
		else
877
	export S D
1019
			set_abi ${ABI}
878
	#some packages use an alternative to $S to build in, cause
1020
879
	#our libtool to create problematic .la files
1021
			if [ ${BUILDDIR}/.compiled.${ABI} -nt "${WORKDIR}" ]; then
880
	export PWORKDIR="$WORKDIR"
1022
				echo ">>> It appears that ${PN} is already compiled for ABI=${ABI}; skipping."
881
	src_compile
1023
				echo ">>> (clean to force compilation)"
1024
				unset_abi
1025
				continue
1026
			fi
1027
		fi
1028
1029
		[ "${CFLAGS-unset}"      != "unset" ] && export CFLAGS
1030
		[ "${CXXFLAGS-unset}"    != "unset" ] && export CXXFLAGS
1031
		[ "${LIBCFLAGS-unset}"   != "unset" ] && export LIBCFLAGS
1032
		[ "${LIBCXXFLAGS-unset}" != "unset" ] && export LIBCXXFLAGS
1033
		[ "${LDFLAGS-unset}"     != "unset" ] && export LDFLAGS
1034
		[ "${ASFLAGS-unset}"     != "unset" ] && export ASFLAGS
1035
1036
		[ "${CCACHE_DIR-unset}"  != "unset" ] && export CCACHE_DIR
1037
		[ "${CCACHE_SIZE-unset}" != "unset" ] && export CCACHE_SIZE
1038
1039
		[ "${DISTCC_DIR-unset}"  == "unset" ] && export DISTCC_DIR="${PORTAGE_TMPDIR}/.distcc"
1040
		[ ! -z "${DISTCC_DIR}" ] && addwrite "${DISTCC_DIR}"
1041
1042
		#our custom version of libtool uses $S and $D to fix
1043
		#invalid paths in .la files
1044
		export S D
1045
		#some packages use an alternative to $S to build in, cause
1046
		#our libtool to create problematic .la files
1047
		export PWORKDIR="${WORKDIR}"
1048
1049
		if [ -d "${S}" ]; then
1050
			cd "${S}"
1051
		fi
1052
		src_compile
1053
1054
		if [ "${ABI}" != "NOMULTILIB" ]; then
1055
			cd "${BUILDDIR}"
1056
			touch .compiled.${ABI} || die "IO Failure -- Failed to 'touch .compiled.${ABI}'"
1057
			unset_abi
1058
		fi
1059
	done
1060
	unset ABI
1061
882
	#|| abort_compile "fail"
1062
	#|| abort_compile "fail"
883
	cd "${BUILDDIR}"
1063
	cd "${BUILDDIR}"
884
	touch .compiled
1064
	touch .compiled || "IO Failure -- Failed to 'touch .compiled'"
885
	cd build-info
1065
	cd build-info
886
1066
887
	echo "$ASFLAGS"        > ASFLAGS
1067
	echo "$ASFLAGS"        > ASFLAGS
888
	echo "$CATEGORY"       > CATEGORY
1068
	echo "$CATEGORY"       > CATEGORY
Lines 913-920 dyn_compile() { Link Here
913
	echo "$RESTRICT"       > RESTRICT
1093
	echo "$RESTRICT"       > RESTRICT
914
	echo "$SLOT"           > SLOT
1094
	echo "$SLOT"           > SLOT
915
	echo "$USE"            > USE
1095
	echo "$USE"            > USE
916
1096
1097
	if [ "$(get_abi_order)" != "NOMULTILIB" ]; then
1098
		echo "$(get_abi_order)" > MULTILIB_ABIS
1099
	fi
1100
917
	set                                         >  environment
1101
	set                                         >  environment
918
	export -p | sed 's:declare -rx:declare -x:' >> environment
1102
	export -p | sed 's:declare -rx:declare -x:' >> environment
919
	bzip2 -9 environment
1103
	bzip2 -9 environment
920
1104
Lines 946-963 dyn_package() { Link Here
946
1130
947
1131
948
dyn_test() {
1132
dyn_test() {
949
	trap "abort_test" SIGINT SIGQUIT
1133
	trap "abort_test" SIGINT SIGQUIT
950
	if [ -d "${S}" ]; then
951
		cd "${S}"
952
	fi
953
	if hasq maketest $RESTRICT; then
1134
	if hasq maketest $RESTRICT; then
954
		ewarn "Skipping make test/check due to ebuild restriction."
1135
		ewarn "Skipping make test/check due to ebuild restriction."
955
		echo ">>> Test phase [explicitly disabled]: ${CATEGORY}/${PF}"
1136
		echo ">>> Test phase [explicitly disabled]: ${CATEGORY}/${PF}"
956
	elif ! hasq maketest $FEATURES; then
1137
	elif ! hasq maketest $FEATURES; then
957
		echo ">>> Test phase [not enabled]: ${CATEGORY}/${PF}"
1138
		echo ">>> Test phase [not enabled]: ${CATEGORY}/${PF}"
958
	else
1139
	else
959
		src_test
1140
		for ABI in $(get_abi_order); do
1141
			if [ "${ABI}" = "NOMULTILIB" ]; then
1142
				unset ABI
1143
			else
1144
				set_abi ${ABI}
1145
			fi
1146
1147
			if [ -d "${S}" ]; then
1148
				cd "${S}"
1149
			fi
1150
			src_test
1151
1152
			if [ "${ABI}" != "NOMULTILIB" ]; then
1153
				unset_abi
1154
			fi
1155
		done
1156
		unset ABI
960
	fi
1157
	fi
961
1158
962
	cd "${BUILDDIR}"
1159
	cd "${BUILDDIR}"
963
	touch .tested || die "Failed to 'touch .tested' in ${BUILDDIR}"
1160
	touch .tested || die "Failed to 'touch .tested' in ${BUILDDIR}"
Lines 969-988 dyn_test() { Link Here
969
dyn_install() {
1166
dyn_install() {
970
	trap "abort_install" SIGINT SIGQUIT
1167
	trap "abort_install" SIGINT SIGQUIT
971
	rm -rf "${BUILDDIR}/image"
1168
	rm -rf "${BUILDDIR}/image"
972
	mkdir "${BUILDDIR}/image"
1169
	mkdir "${BUILDDIR}/image"
973
	if [ -d "${S}" ]; then
974
		cd "${S}"
975
	fi
976
	echo
1170
	echo
977
	echo ">>> Install ${PF} into ${D} category ${CATEGORY}"
1171
	echo ">>> Install ${PF} into ${D} category ${CATEGORY}"
978
	#our custom version of libtool uses $S and $D to fix
1172
979
	#invalid paths in .la files
1173
	for ABI in $(get_abi_order); do
980
	export S D
1174
		if [ "${ABI}" = "NOMULTILIB" ]; then
981
	#some packages uses an alternative to $S to build in, cause
1175
			unset ABI
982
	#our libtool to create problematic .la files
1176
		else
983
	export PWORKDIR="$WORKDIR"
1177
			set_abi ${ABI}
984
	src_install
1178
		fi
1179
1180
		#our custom version of libtool uses $S and $D to fix
1181
		#invalid paths in .la files
1182
		export S D
1183
		#some packages uses an alternative to $S to build in, cause
1184
		#our libtool to create problematic .la files
1185
		export PWORKDIR="${WORKDIR}"
1186
1187
		if [ -d "${S}" ]; then
1188
			cd "${S}"
1189
		fi
1190
		src_install
1191
1192
		if [ "${ABI}" != "NOMULTILIB" ]; then
1193
			unset_abi
1194
		fi
1195
	done
1196
	unset ABI
1197
985
	#|| abort_install "fail"
1198
	#|| abort_install "fail"
986
	prepall
1199
	prepall
987
	cd "${D}"
1200
	cd "${D}"
988
1201
Lines 1813-1823 for myarg in $*; do Link Here
1813
done
2026
done
1814
2027
1815
if [ "$myarg" != "clean" ]; then
2028
if [ "$myarg" != "clean" ]; then
1816
	# Save current environment and touch a success file. (echo for success)
2029
	# Save current environment and touch a success file. (echo for success)
1817
	umask 002
2030
	save_env
1818
	set | egrep -v "^SANDBOX_" > "${T}/environment" 2>/dev/null
1819
	chown portage:portage "${T}/environment" &>/dev/null
1820
	chmod g+w "${T}/environment" &>/dev/null
1821
fi
2031
fi
1822
2032
1823
exit 0
2033
exit 0

Return to bug 75420