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

Collapse All | Expand All

(-)prepstrip (-11 / +15 lines)
Lines 5-14 Link Here
5
5
6
source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
6
source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
7
7
8
unset NOSTRIP
8
if hasq nostrip ${FEATURES} ${RESTRICT} || \
9
if hasq nostrip ${FEATURES} ${RESTRICT} || \
9
   hasq strip ${RESTRICT}
10
   hasq strip ${RESTRICT}
10
then
11
then
11
	exit 0
12
	NOSTRIP=1
13
	hasq installsources ${FEATURES} || exit 0
12
fi
14
fi
13
15
14
STRIP=${STRIP:-${CHOST}-strip}
16
STRIP=${STRIP:-${CHOST}-strip}
Lines 24-30 Link Here
24
	local x=$1
26
	local x=$1
25
	local y="${D}usr/lib/debug/${x:${#D}}.debug"
27
	local y="${D}usr/lib/debug/${x:${#D}}.debug"
26
28
29
	if hasq installsources ${FEATURES} && [[ -x "/usr/bin/debugedit" ]] ; then
30
		debugedit -b "${WORKDIR}" -d /usr/src/debug/${PF} -l "${T}"/debug.sources "${x}"
31
		if [[ -s ${T}/debug.sources ]] ; then 
32
			[[ -d ${D}/usr/src/debug/${PF} ]] || mkdir -p "${D}/usr/src/debug/${PF}"
33
			cat "${T}"/debug.sources | (cd "${WORKDIR}"; LANG=C sort -z -u | rsync -a0 --files-from=- "${WORKDIR}/" "${D}/usr/src/debug/${PF}/" )
34
		fi
35
	fi
36
27
	hasq splitdebug ${FEATURES} || return 0
37
	hasq splitdebug ${FEATURES} || return 0
38
	[[ -n ${NOSTRIP} ]] && return 0
28
39
29
	# dont save debug info twice.
40
	# dont save debug info twice.
30
	[[ ${x:7} == ".debug" ]] && return 0
41
	[[ ${x:7} == ".debug" ]] && return 0
Lines 34-48 Link Here
34
	${OBJCOPY} --add-gnu-debuglink="${y}" "${x}"
45
	${OBJCOPY} --add-gnu-debuglink="${y}" "${x}"
35
	chmod a-x,o-w "${y}"
46
	chmod a-x,o-w "${y}"
36
47
37
	hasq installsources ${FEATURES} || return 0
38
39
	if [[ -x "/usr/bin/debugedit" ]] ; then
40
		debugedit -b "${WORKDIR}" -d /usr/src/debug/${PF} -l "${T}"/debug.sources "${x}"
41
		if [[ -s ${T}/debug.sources ]] ; then 
42
			[[ -d ${D}/usr/src/debug/${PF} ]] || mkdir -p "${D}/usr/src/debug/${PF}"
43
			cat "${T}"/debug.sources | (cd "${WORKDIR}"; LANG=C sort -z -u | rsync -a0 --files-from=- "${WORKDIR}/" "${D}/usr/src/debug/${PF}/" )
44
		fi
45
	fi
46
}
48
}
47
49
48
# The existance of the section .symtab tells us that a binary is stripped.
50
# The existance of the section .symtab tells us that a binary is stripped.
Lines 77-87 Link Here
77
79
78
	if [[ ${f} == *"current ar archive"* ]] ; then
80
	if [[ ${f} == *"current ar archive"* ]] ; then
79
		vecho "   ${x:${#D}}"
81
		vecho "   ${x:${#D}}"
80
		[[ ${stripitbaby} -eq 1 ]] && ${STRIP} -g "${x}"
82
		[[ -n ${NOSTRIP} ]] && continue
83
		[[ ${stripitbaby} -eq 1 && -z "${NOSTRIP}" ]] && ${STRIP} -g "${x}"
81
	fi
84
	fi
82
	if [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* ]] ; then
85
	if [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* ]] ; then
83
		vecho "   ${x:${#D}}"
86
		vecho "   ${x:${#D}}"
84
		save_elf_debug "${x}"
87
		save_elf_debug "${x}"
88
		[[ -n ${NOSTRIP} ]] && continue
85
		[[ ${stripitbaby} -eq 1 ]] && ${STRIP} ${PORTAGE_STRIP_FLAGS} "${x}"
89
		[[ ${stripitbaby} -eq 1 ]] && ${STRIP} ${PORTAGE_STRIP_FLAGS} "${x}"
86
	fi
90
	fi
87
done
91
done

Return to bug 136197