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

Collapse All | Expand All

(-)pym/portage.py (-1 / +1 lines)
Lines 2379-2385 Link Here
2379
		sesandbox=actionmap[mydo]["args"][2], logfile=logfile)
2379
		sesandbox=actionmap[mydo]["args"][2], logfile=logfile)
2380
	if phase_retval == os.EX_OK:
2380
	if phase_retval == os.EX_OK:
2381
		if mydo == "install":
2381
		if mydo == "install":
2382
			mycommand = " ".join([MISC_SH_BINARY, "install_qa_check"])
2382
			mycommand = " ".join([MISC_SH_BINARY, "install_qa_check", "install_multilib_wrappers"])
2383
			return spawn(mycommand, mysettings, debug=debug,
2383
			return spawn(mycommand, mysettings, debug=debug,
2384
				droppriv=actionmap[mydo]["args"][0],
2384
				droppriv=actionmap[mydo]["args"][0],
2385
				free=actionmap[mydo]["args"][1],
2385
				free=actionmap[mydo]["args"][1],
(-)bin/misc-functions.sh (+22 lines)
Lines 16-21 Link Here
16
shift $#
16
shift $#
17
source /usr/lib/portage/bin/ebuild.sh
17
source /usr/lib/portage/bin/ebuild.sh
18
18
19
install_multilib_wrappers() {
20
	MULTILIB_WRAPPER_MASK="${MULTILIB_WRAPPER_MASK:-*-config}"
21
	save_IFS
22
	IFS=":"
23
	for mypath in ${PATH} ; do
24
		restore_IFS
25
		if [[ -d ${D}/${mypath} ]] ; then
26
			dowrap=$(find ${D}${mypath} -type f -name "${MULTILIB_WRAPPER_MASK}" | sed -e "s:${D}/::" | \
27
			gawk '
28
			BEGIN { split("'"${MULTILIB_WRAPPER_IGNORE}"'", ignore); }
29
			{       for (idx in ignore)
30
						if ($NF ~ "^"ignore[idx]"$")
31
						next;
32
					print;
33
			}')
34
			if [[ -n ${dowrap} ]] ; then
35
				generate-multilib-wrapper ${D} ${dowrap} || die "generating multilib wrapper scripts failed"
36
			fi
37
		fi
38
	done
39
}
40
19
install_qa_check() {
41
install_qa_check() {
20
42
21
	prepall
43
	prepall
(-)bin/generate-multilib-wrapper (+43 lines)
Line 0 Link Here
1
#!/bin/bash
2
if [[ ${#} -lt 2 ]] ; then
3
	echo "${0}: usage: ${0} <target root> <file to wrap> [more files]" 1>&2
4
	exit 1
5
fi
6
7
myroot=${1}
8
shift
9
while [[ -n ${1} ]] ; do
10
	script=$(basename ${1})
11
	if [[ -n ${MULTILIB_ABIS} ]] && \
12
		[[ ${MULTILIB_ABIS} != ${MULTILIB_ABIS/ /} ]] ; then
13
		if ! [[ -e ${myroot}/${1}-${ABI} ]] ; then
14
			mv -f "${myroot}/${1}" "${myroot}/${1}-${ABI}" || exit 2
15
		fi
16
		
17
		cat <<- EOF > "${myroot}/${1}"
18
		#!/bin/bash
19
		if [[ -n "\${ABI}" ]] ; then
20
			abi="\${ABI}"
21
		elif [[ -n "\${DEFAULT_ABI}" ]] ; then
22
			abi="\${DEFAULT_ABI}"
23
		EOF
24
		
25
		for x in ${MULTILIB_ABIS}; do
26
			if [[ ${x} != ${DEFAULT_ABI} ]] ; then
27
				myabis="${myabis:+${myabis} }${x}"
28
			fi
29
		done
30
		
31
		myabis="${DEFAULT_ABI} ${myabis}"
32
		for myabi in ${myabis} ; do
33
			cat <<- EOF >> "${myroot}/${1}"
34
			elif [[ -f /${1}-${myabi} ]] ; then
35
				abi="${myabi}"
36
			EOF
37
		done
38
39
		echo -e "fi\n\nexec "/${1}-\${abi}" \"\${@}\"" >> "${myroot}/${1}"
40
		chmod $(stat -c '%a' "${myroot}/${1}-${ABI}") "${myroot}/${1}" || exit 3
41
	fi
42
	shift
43
done

Return to bug 118815