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

Collapse All | Expand All

(-)portage-2.2.0_alpha142.orig/bin/ebuild-helpers/ecompressdir (-1 / +14 lines)
Lines 67-72 Link Here
67
	find "${dir}" -type f ${negate} -iname '*'${suffix} -print0 | ${XARGS} -0 ${binary}
67
	find "${dir}" -type f ${negate} -iname '*'${suffix} -print0 | ${XARGS} -0 ${binary}
68
	((ret|=$?))
68
	((ret|=$?))
69
69
70
	local filelist="${T}/ecompress-filelist-${RANDOM}"
71
	if [ ! -e "${filelist}" ] ; then
72
		touch "${filelist}"
73
	else
74
		while [ -e "${filelist}" ] ; do 
75
			filelist="${T}/ecompress-filelist-${RANDOM}"
76
			sleep 1
77
		done
78
		touch "${filelist}"
79
	fi
80
81
	(find "${dir}" -type l -print0) > "${filelist}"
70
	while read -r -d $'\0' brokenlink ; do
82
	while read -r -d $'\0' brokenlink ; do
71
		[[ -e ${brokenlink} ]] && continue
83
		[[ -e ${brokenlink} ]] && continue
72
		olddest=$(readlink "${brokenlink}")
84
		olddest=$(readlink "${brokenlink}")
Lines 97-103 Link Here
97
			&& ln -snf "${newdest}" "${brokenlink}${suffix}" \
109
			&& ln -snf "${newdest}" "${brokenlink}${suffix}" \
98
			|| ln -snf "${newdest}" "${brokenlink%${suffix}}"
110
			|| ln -snf "${newdest}" "${brokenlink%${suffix}}"
99
		((ret|=$?))
111
		((ret|=$?))
100
	done < <(find "${dir}" -type l -print0)
112
	done < "${filelist}"
113
	rm "${filelist}"
101
	return ${ret}
114
	return ${ret}
102
}
115
}
103
116
(-)portage-2.2.0_alpha142.orig/bin/ebuild-helpers/prepstrip (-7 / +6 lines)
Lines 276-292 Link Here
276
else
276
else
277
	get_inode_number() { stat -c '%i' "$1"; }
277
	get_inode_number() { stat -c '%i' "$1"; }
278
fi
278
fi
279
# Use sort -u to eliminate duplicates for bug #445336.
280
(scanelf -yqRBF '#k%F' -k '.symtab' "$@"
281
 find "$@" -type f ! -type l -name '*.a' ) | LC_ALL=C sort -u > ${tmpdir}/prepstrip-filelist-$$
282
279
cd "${tmpdir}/inodes" || die "cd failed unexpectedly"
283
cd "${tmpdir}/inodes" || die "cd failed unexpectedly"
280
while read -r x ; do
284
while read -r x ; do
281
	inode_link=$(get_inode_number "${x}") || die "stat failed unexpectedly"
285
	inode_link=$(get_inode_number "${x}") || die "stat failed unexpectedly"
282
	echo "${x}" >> "${inode_link}" || die "echo failed unexpectedly"
286
	echo "${x}" >> "${inode_link}" || die "echo failed unexpectedly"
283
done < <(
287
done < ${tmpdir}/prepstrip-filelist-$$
284
	# Use sort -u to eliminate duplicates for bug #445336.
288
rm ${tmpdir}/prepstrip-filelist-$$
285
	(
286
		scanelf -yqRBF '#k%F' -k '.symtab' "$@"
287
		find "$@" -type f ! -type l -name '*.a'
288
	) | LC_ALL=C sort -u
289
)
290
289
291
# Now we look for unstripped binaries.
290
# Now we look for unstripped binaries.
292
for inode_link in $(shopt -s nullglob; echo *) ; do
291
for inode_link in $(shopt -s nullglob; echo *) ; do

Return to bug 447810