Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 27739 Details for
Bug 45150
Separate debug information for packages built with portage
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
newer version
keepdebug3.patch (text/plain), 9.80 KB, created by
Olivier Crete (RETIRED)
on 2004-03-21 08:30:04 UTC
(
hide
)
Description:
newer version
Filename:
MIME Type:
Creator:
Olivier Crete (RETIRED)
Created:
2004-03-21 08:30:04 UTC
Size:
9.80 KB
patch
obsolete
>diff -u bin.orig/dobin bin/dobin >--- bin.orig/dobin 2004-03-19 13:11:35.000000000 +0100 >+++ bin/dobin 2004-03-21 16:54:35.194900240 +0100 >@@ -10,22 +10,36 @@ > > if [ ! -z "${CBUILD}" ] && [ "${CBUILD}" != "${CHOST}" ]; then > STRIP=${CHOST}-strip >+ OBJCOPY=${CHOST}-objcopy > else > STRIP=strip >+ OBJCOPY=objcopy > fi > > if [ ! -d "${D}${DESTTREE}/bin" ] ; then > install -d "${D}${DESTTREE}/bin" > fi > >+if ( [ "${FEATURES//*keepdebugbin*/true}" == "true" ] || [ "${RESTRICT//*keepdebugbin*/true}" == "true" ] ) && [ ! -d "${D}${DESTTREE}/bin/.debug" ] ; then >+ install -d "${D}${DESTTREE}/bin/.debug" >+fi >+ >+ > for x in "$@" ; do > if [ -x "${x}" ] ; then >+ if [ "${FEATURES//*keepdebugbin*/true}" == "true" ] || [ "${RESTRICT//*keepdebugbin*/true}" == "true" ] ; then >+ ${OBJCOPY} --only-keep-debug ${x} ${x}.dbg >+ fi > if [ "${FEATURES//*nostrip*/true}" != "true" ] && [ "${RESTRICT//*nostrip*/true}" != "true" ] ; then > MYVAL=`file "${x}" | grep "ELF"` > if [ -n "$MYVAL" ] ; then > ${STRIP} "${x}" > fi > fi >+ if [ "${FEATURES//*keepdebugbin*/true}" == "true" ] || [ "${RESTRICT//*keepdebugbin*/true}" == "true" ] ; then >+ ${OBJCOPY} --add-gnu-debuglink=${x}.dbg ${x} >+ install ${x}.dbg "${S}${DESTREE}/bin/.debug" >+ fi > #if executable, use existing perms > install "${x}" "${D}${DESTTREE}/bin" > else >diff -u bin.orig/doexe bin/doexe >--- bin.orig/doexe 2004-03-19 13:11:35.000000000 +0100 >+++ bin/doexe 2004-03-21 16:55:28.993721576 +0100 >@@ -12,13 +12,23 @@ > install -d "${D}${EXEDESTTREE}" > fi > >+if ( [ "${FEATURES//*keepdebugbin*/true}" == "true" ] || [ "${RESTRICT//*keepdebugbin*/true}" == "true" ] ) && [ ! -d "${D}${DESTTREE}/bin/.debug" ] ; then >+ install -d "${D}${DESTTREE}${EXEDESTTREE}/.debug" >+fi >+ > if [ ! -z "${CBUILD}" ] && [ "${CBUILD}" != "${CHOST}" ]; then > STRIP=${CHOST}-strip >+ OBJCOPY=${CHOST}-objcopy > else > STRIP=strip >+ OBJCOPY=objcopy > fi > > for x in "$@" ; do >+ if [ "${FEATURES//*keepdebugbin*/true}" == "true" ] || [ "${RESTRICT//*keepdebugbin*/true}" == "true" ] ; then >+ ${OBJCOPY} --only-keep-debug ${x} ${x}.dbg >+ fi >+ > if [ "${FEATURES//*nostrip*/true}" != "true" ] && [ "${RESTRICT//*nostrip*/true}" != "true" ] ; then > MYVAL=`file "${x}" | grep "ELF"` > if [ -n "$MYVAL" ] ; then >@@ -34,5 +44,9 @@ > else > mysrc="${x}" > fi >+ if [ "${FEATURES//*keepdebugbin*/true}" == "true" ] || [ "${RESTRICT//*keepdebugbin*/true}" == "true" ] ; then >+ ${OBJCOPY} --add-gnu-debuglink=${x}.dbg ${x} >+ install ${x}.dbg "${S}${EXEDESTREE}/.debug" >+ fi > install ${EXEOPTIONS} "${mysrc}" "${D}${EXEDESTTREE}" > done >diff -u bin.orig/dolib.so bin/dolib.so >--- bin.orig/dolib.so 2004-03-19 13:11:35.000000000 +0100 >+++ bin/dolib.so 2004-03-19 13:59:07.000000000 +0100 >@@ -10,19 +10,32 @@ > > if [ ! -z "${CBUILD}" ] && [ "${CBUILD}" != "${CHOST}" ]; then > STRIP=${CHOST}-strip >+ OBJCOPY=${CHOST}-objcopy > else > STRIP=strip >+ OBJCOPY=objcopy > fi > > if [ ! -d "${D}${DESTTREE}/lib" ] ; then > install -d "${D}${DESTTREE}/lib" > fi > >+if ( [ "${FEATURES//*keepdebug*/true}" == "true" ] || [ "${RESTRICT//*keepdebug*/true}" == "true" ] ) && [ ! -d "${D}${DESTTREE}/lib/.debug" ] ; then >+ install -d "${D}${DESTTREE}/lib/.debug" >+fi >+ >+ > for x in "$@" ; do > if [ -e "${x}" ] ; then >+ if [ "${FEATURES//*keepdebug*/true}" == "true" ] || [ "${RESTRICT//*keepdebug*/true}" == "true" ] ; then >+ ${OBJCOPY} --only-keep-debug ${x} ${x}.dbg >+ fi > if [ "${FEATURES//*nostrip*/true}" != "true" ] && [ "${RESTRICT//*nostrip*/true}" != "true" ] ; then > ${STRIP} --strip-debug "${x}" > fi >+ if [ "${FEATURES//*keepdebug*/true}" == "true" ] || [ "${RESTRICT//*keepdebug*/true}" == "true" ] ; then >+ ${OBJCOPY} --add-gnu-debuglink=${x}.dbg ${x} >+ install -m0644 ${x}.dbg "${S}${DESTREE}/lib/.debug" > install -m0755 "${x}" "${D}${DESTTREE}/lib" > else > echo "${0}: ${x} does not exist" >diff -u bin.orig/dosbin bin/dosbin >--- bin.orig/dosbin 2004-03-19 13:11:35.000000000 +0100 >+++ bin/dosbin 2004-03-21 16:56:38.211198920 +0100 >@@ -11,20 +11,32 @@ > install -d "${D}${DESTTREE}/sbin" > fi > >+if ( [ "${FEATURES//*keepdebugbin*/true}" == "true" ] || [ "${RESTRICT//*keepdebugbin*/true}" == "true" ] ) && [ ! -d "${D}${DESTTREE}/sbin/.debug" ] ; then >+ install -d "${D}${DESTTREE}/sbin/.debug" >+fi >+ > if [ ! -z "${CBUILD}" ] && [ "${CBUILD}" != "${CHOST}" ]; then > STRIP=${CHOST}-strip >+ OBJCOPY=${CHOST}-objcopy > else > STRIP=strip >+ OBJCOPY=objcopy > fi >- > for x in "$@" ; do > if [ -x "${x}" ] ; then >+ if [ "${FEATURES//*keepdebugbin*/true}" == "true" ] || [ "${RESTRICT//*keepdebugbin*/true}" == "true" ] ; then >+ ${OBJCOPY} --only-keep-debug ${x} ${x}.dbg >+ fi > if [ "${FEATURES//*nostrip*/true}" != "true" ] && [ "${RESTRICT//*nostrip*/true}" != "true" ] ; then > MYVAL=`file "${x}" | grep "ELF"` > if [ "$MYVAL" ] ; then > ${STRIP} "${x}" > fi > fi >+ if [ "${FEATURES//*keepdebugbin*/true}" == "true" ] || [ "${RESTRICT//*keepdebugbin*/true}" == "true" ] ; then >+ ${OBJCOPY} --add-gnu-debuglink=${x}.dbg ${x} >+ install -m644 ${x}.dbg "${S}${DESTREE}/sbin/.debug" >+ fi > #if executable, use existing perms > install -m0755 "${x}" "${D}${DESTTREE}/sbin" > else >diff -u bin.orig/prepallstrip bin/prepallstrip >--- bin.orig/prepallstrip 2004-03-19 13:11:35.000000000 +0100 >+++ bin/prepallstrip 2004-03-19 14:00:36.000000000 +0100 >@@ -3,7 +3,7 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: /home/cvsroot/gentoo-src/portage/bin/prepallstrip,v 1.11 2003/04/09 14:36:59 carpaski Exp $ > >-if [ "${FEATURES//*nostrip*/true}" == "true" ] || [ "${RESTRICT//*nostrip*/true}" == "true" ] ; then >+if ( [ "${FEATURES//*nostrip*/true}" == "true" ] || [ "${RESTRICT//*nostrip*/true}" == "true" ] ) && ( [ "${FEATURES//*keepdebug*/true}" != "true" ] && [ "${RESTRICT//*keepdebug*/true}" != "true" ] ) ; then > exit 0 > fi > >diff -u bin.orig/preplib.so bin/preplib.so >--- bin.orig/preplib.so 2004-03-19 13:11:35.000000000 +0100 >+++ bin/preplib.so 2004-03-21 17:00:10.593911840 +0100 >@@ -3,14 +3,16 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: /home/cvsroot/gentoo-src/portage/bin/preplib.so,v 1.9 2003/04/09 14:36:59 carpaski Exp $ > >-if [ "${FEATURES//*nostrip*/true}" == "true" ] || [ "${RESTRICT//*nostrip*/true}" == "true" ] ; then >+if ( [ "${FEATURES//*nostrip*/true}" == "true" ] || [ "${RESTRICT//*nostrip*/true}" == "true" ] ) && ( [ "${FEATURES//*keepdebug*/true}" != "true" ] && [ "${RESTRICT//*keepdebug*/true}" != "true" ] ); then > exit 0 > fi > > if [ ! -z "${CBUILD}" ] && [ "${CBUILD}" != "${CHOST}" ]; then > STRIP=${CHOST}-strip >+ OBJCOPY=${CHOST}-objcopy > else > STRIP=strip >+ OBJCOPY=objcopy > fi > > for x in "$@" ; do >@@ -19,7 +21,16 @@ > f="`file "${y}"`" > if [ "${f/*SB shared object*/1}" == "1" ] ; then > echo "${y}" >- ${STRIP} --strip-debug "${y}" >+ if [ "${FEATURES//*keepdebug*/true}" == "true" ] || [ "${RESTRICT//*keepdebug*/true}" == "true" ]; then >+ if [ ! -d "$(dirname "${x}")/.debug" ] ; then >+ install -d "$(dirname "${x}")/.debug" >+ fi >+ ${OBJCOPY} --only-keep-debug ${x} $(dirname "${x}")/.debug/$(basename "${x}").dbg >+ ${OBJCOPY} --add-gnu-debuglink=$(dirname "${x}")/.debug/$(basename "${x}").dbg ${x} >+ fi >+ if [ "${FEATURES//*nostrip*/true}" != "true" ] && [ "${RESTRICT//*nostrip*/true}" != "true" ]; then >+ ${STRIP} --strip-debug "${y}" >+ fi > fi > done > ldconfig -n -N "${D}${x}" >diff -u bin.orig/prepstrip bin/prepstrip >--- bin.orig/prepstrip 2004-03-19 13:11:35.000000000 +0100 >+++ bin/prepstrip 2004-03-21 17:00:48.844096928 +0100 >@@ -3,15 +3,18 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: /home/cvsroot/gentoo-src/portage/bin/prepstrip,v 1.17 2004/02/04 22:40:21 carpaski Exp $ > >-if [ "${FEATURES//*nostrip*/true}" == "true" ] || [ "${RESTRICT//*nostrip*/true}" == "true" ] ; then >+if ( [ "${FEATURES//*nostrip*/true}" == "true" ] || [ "${RESTRICT//*nostrip*/true}" == "true" ] ) && ( [ "${FEATURES//*keepdebug*/true}" != "true" ] && [ "${RESTRICT//*keepdebug*/true}" != "true" ] ) ; then > echo "nostrip" > exit 0 > fi > >+ > if [ ! -z "${CBUILD}" ] && [ "${CBUILD}" != "${CHOST}" ]; then > STRIP=${CHOST}-strip >+ OBJCOPY=${CHOST}-objcopy > else > STRIP=strip >+ OBJCOPY=objcopy > fi > > echo "strip: " >@@ -24,19 +27,35 @@ > f=$(file "${x}") > if [ -z "${f/*SB executable*/}" ]; then > echo " ${x:${#D}:${#x}}" >- ${STRIP} "${x}" >+ if [ "${FEATURES//*keepdebugbin*/true}" == "true" ] || [ "${RESTRICT//*keepdebugbin*/true}" == "true" ]; then >+ if [ ! -d "$(dirname "${x}")/.debug" ] ; then >+ install -d "$(dirname "${x}")/.debug" >+ fi >+ ${OBJCOPY} --only-keep-debug ${x} $(dirname "${x}")/.debug/$(basename "${x}").dbg >+ ${OBJCOPY} --add-gnu-debuglink=$(dirname "${x}")/.debug/$(basename "${x}").dbg ${x} >+ fi >+ if [ "${FEATURES//*nostrip*/true}" != "true" ] && [ "${RESTRICT//*nostrip*/true}" != "true" ]; then >+ ${STRIP} "${x}" >+ fi > fi > if [ -z "${f/*SB shared object*/}" ]; then > echo " ${x:${#D}:${#x}}" >- ${STRIP} --strip-unneeded "${x}" >- >- # etdyn binaries are shared objects, but not really. Non-relocatable. >- if [ -x /usr/bin/isetdyn ]; then >- if /usr/bin/isetdyn "${x}" >/dev/null; then >- ${STRIP} "${x}" >+ if [ "${FEATURES//*keepdebug*/true}" == "true" ] || [ "${RESTRICT//*keepdebug*/true}" == "true" ]; then >+ if [ ! -d "$(dirname "${x}")/.debug" ] ; then >+ install -d "$(dirname "${x}")/.debug" >+ fi >+ ${OBJCOPY} --only-keep-debug ${x} $(dirname "${x}")/.debug/$(basename "${x}").dbg >+ ${OBJCOPY} --add-gnu-debuglink=$(dirname "${x}")/.debug/$(basename "${x}").dbg ${x} >+ fi >+ if [ "${FEATURES//*nostrip*/true}" != "true" ] && [ "${RESTRICT//*nostrip*/true}" != "true" ]; then >+ ${STRIP} --strip-unneeded "${x}" >+ # etdyn binaries are shared objects, but not really. Non-relocatable. >+ if [ -x /usr/bin/isetdyn ]; then >+ if /usr/bin/isetdyn "${x}" >/dev/null; then >+ ${STRIP} "${x}" >+ fi > fi > fi >- > fi > fi > done
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 45150
:
27633
|
27738
|
27739
|
32328
|
32329
|
32330
|
35701
|
53254
|
69216
|
73275
|
76121
|
76124