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

Collapse All | Expand All

(-)ebuild.sh.orig (-1 / +36 lines)
Lines 650-657 Link Here
650
	#scripts, so set it to $T.
650
	#scripts, so set it to $T.
651
	export TMP="${T}"
651
	export TMP="${T}"
652
	export TMPDIR="${T}"
652
	export TMPDIR="${T}"
653
	src_compile 
653
	local strace_pid=0 olog=${T}/openedfiles.log olst=${T}/openedfiles.lst
654
	if [ "$FINDDEPS" ]; then
655
		if [ -x /usr/bin/strace ]; then
656
			strace -qf -e signal=\!all -e open,execve -o "$olog" -p $$ &
657
			strace_pid=$!
658
			# Wait for strace to start
659
			local count=10
660
			while [ ! -f "$olog" ] && [ $count -gt 0 ]; do
661
				sleep 0.1
662
				set count--
663
			done
664
			if [ $count -eq 0 ]; then
665
				ewarn Couldn\'t start strace \!\!\!
666
				strace_pid=0
667
			fi
668
		else
669
			ewarn You need to emerge dev-util/strace for this\!\!\!
670
		fi
671
	fi
672
	src_compile
654
	#|| abort_compile "fail" 
673
	#|| abort_compile "fail" 
674
	if [ $strace_pid -gt 0 ]; then
675
		kill $strace_pid
676
		ewarn Packages needed for compilation:
677
		awk -F\" '$2~/^\// && !/ENOENT/ && $2!~/\/tmp\// && !/^'$$'/{
678
				files[$2]++
679
			}
680
			END{
681
				for(f in files){
682
					print "^obj " f " "
683
				}
684
			}' "$olog" > "$olst"
685
		grep -l -f "$olst" /var/db/pkg/*/*/CONTENTS | \
686
			awk -F/ '{print "\t" $(NF-2) "/" $(NF-1)}'
687
		ewarn If you wonder about one of these, run
688
		ewarn grep -f "${T}/openedfiles.lst" /var/db/pkg/_package_/CONTENTS
689
	fi
655
	cd ${BUILDDIR}
690
	cd ${BUILDDIR}
656
	touch .compiled
691
	touch .compiled
657
	if [ ! -e "build-info" ]
692
	if [ ! -e "build-info" ]

Return to bug 3141