aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNicholas Jones <carpaski@gentoo.org>2004-12-05 10:23:41 +0000
committerNicholas Jones <carpaski@gentoo.org>2004-12-05 10:23:41 +0000
commitef5c8c6e459a6403765a07af9a72163df680606c (patch)
treeee1c2deea567e69a9b45e5da751bf153e6828fd9 /bin
parent- Removed prozilla FETCHCOMMAND= from cnf/make.conf* file, since we don't sup... (diff)
downloadportage-cvs-ef5c8c6e459a6403765a07af9a72163df680606c.tar.gz
portage-cvs-ef5c8c6e459a6403765a07af9a72163df680606c.tar.bz2
portage-cvs-ef5c8c6e459a6403765a07af9a72163df680606c.zip
Strip patch from SpanKY. cpv_exists() fix.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/doexe14
-rwxr-xr-xbin/preplib.so19
-rwxr-xr-xbin/prepstrip23
3 files changed, 16 insertions, 40 deletions
diff --git a/bin/doexe b/bin/doexe
index ccaa0dd..88a01a6 100755
--- a/bin/doexe
+++ b/bin/doexe
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/doexe,v 1.10 2004/10/04 13:56:50 vapier Exp $
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/doexe,v 1.11 2004/12/05 10:23:41 carpaski Exp $
mynum=${#}
if [ ${mynum} -lt 1 ] ; then
@@ -12,19 +12,7 @@ if [ ! -d "${D}${EXEDESTTREE}" ] ; then
install -d "${D}${EXEDESTTREE}"
fi
-if [ ! -z "${CBUILD}" ] && [ "${CBUILD}" != "${CHOST}" ]; then
- STRIP=${CHOST}-strip
-else
- STRIP=strip
-fi
-
for x in "$@" ; do
- if [ "${FEATURES//*nostrip*/true}" != "true" ] && [ "${RESTRICT//*nostrip*/true}" != "true" ] ; then
- MYVAL=`file "${x}" | grep "ELF"`
- if [ -n "$MYVAL" ] ; then
- ${STRIP} "${x}"
- fi
- fi
if [ -L "${x}" ] ; then
cp "${x}" "${T}"
mysrc="${T}"/`/usr/bin/basename "${x}"`
diff --git a/bin/preplib.so b/bin/preplib.so
index 94d9105..ea4e084 100755
--- a/bin/preplib.so
+++ b/bin/preplib.so
@@ -1,27 +1,10 @@
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/preplib.so,v 1.10 2004/10/04 13:56:50 vapier Exp $
-
-if [ "${FEATURES//*nostrip*/true}" == "true" ] || [ "${RESTRICT//*nostrip*/true}" == "true" ] ; then
- exit 0
-fi
-
-if [ ! -z "${CBUILD}" ] && [ "${CBUILD}" != "${CHOST}" ]; then
- STRIP=${CHOST}-strip
-else
- STRIP=strip
-fi
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/preplib.so,v 1.11 2004/12/05 10:23:41 carpaski Exp $
for x in "$@" ; do
if [ -d "${D}${x}" ] ; then
- for y in `find "${D}${x}"/ -type f \( -name "*.so" -or -name "*.so.*" \) 2>/dev/null` ; do
- f="`file "${y}"`"
- if [ "${f/*SB shared object*/1}" == "1" ] ; then
- echo "${y}"
- ${STRIP} --strip-debug "${y}"
- fi
- done
ldconfig -n -N "${D}${x}"
fi
done
diff --git a/bin/prepstrip b/bin/prepstrip
index 0661127..d2889ae 100755
--- a/bin/prepstrip
+++ b/bin/prepstrip
@@ -1,35 +1,39 @@
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/prepstrip,v 1.23 2004/10/19 04:58:42 carpaski Exp $
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/prepstrip,v 1.24 2004/12/05 10:23:41 carpaski Exp $
if [ "${FEATURES//*nostrip*/true}" == "true" ] || [ "${RESTRICT//*nostrip*/true}" == "true" ] ; then
echo "nostrip"
STRIP="/bin/false"
else
- if [ ! -z "${CBUILD}" ] && [ "${CBUILD}" != "${CHOST}" ]; then
- STRIP=${CHOST}-strip
- else
- STRIP=strip
- fi
+ STRIP="${STRIP:-${CHOST}-strip}"
+ type -p ${STRIP} > /dev/null || STRIP=strip
fi
-echo "strip: "
+STRIP_FLAGS="${STRIP_FLAGS:---strip-unneeded}"
+
+echo "strip: ${STRIP_FLAGS}"
retval=0
-for x in "$@"; do # "$@" quotes each element... Plays nice with spaces.
+
+for x in "$@" ; do
if [ -d "${x}" ]; then
# We only want files. So make a pass for each directory and call again.
find "${x}" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 -or -name '*.so' -or -name '*.so.*' \) -print0 |
$XARGS -0 -n500 prepstrip
else
f=$(file "${x}")
+ if [ -z "${f/*current ar archive*/}" ]; then
+ echo " ${x:${#D}:${#x}}"
+ ${STRIP} -g "${x}"
+ fi
if [ -z "${f/*SB executable*/}" ]; then
echo " ${x:${#D}:${#x}}"
${STRIP} "${x}"
fi
if [ -z "${f/*SB shared object*/}" ]; then
echo " ${x:${#D}:${#x}}"
- ${STRIP} --strip-unneeded "${x}"
+ ${STRIP} ${STRIP_FLAGS} "${x}"
if [ -x /usr/bin/readelf ] ; then
/usr/bin/readelf -d "${x}" | grep TEXTREL > /dev/null
@@ -48,4 +52,5 @@ for x in "$@"; do # "$@" quotes each element... Plays nice with spaces.
fi
fi
done
+
exit ${retval}