aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-11-11 15:36:14 +0000
committerAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-11-11 15:36:14 +0000
commit15e745302f54207940b8cf43e1aa1764b81e3bdb (patch)
treeb17e062676bc0a978ba70bce6448e6fe113cb0ea
parent6dad93ef4673bb0060474fa5ed540b92de62c697 (diff)
downloadpaludis-15e745302f54207940b8cf43e1aa1764b81e3bdb.tar.gz
paludis-15e745302f54207940b8cf43e1aa1764b81e3bdb.tar.xz
Handle /usr/lib being a symlink better.
-rw-r--r--paludis/repositories/e/ebuild/builtin_strip.bash8
1 files changed, 7 insertions, 1 deletions
diff --git a/paludis/repositories/e/ebuild/builtin_strip.bash b/paludis/repositories/e/ebuild/builtin_strip.bash
index 4d21bf3..183e051 100644
--- a/paludis/repositories/e/ebuild/builtin_strip.bash
+++ b/paludis/repositories/e/ebuild/builtin_strip.bash
@@ -35,6 +35,12 @@ builtin_strip()
fi
fi
+ if [[ -d "${ROOT}/usr/lib" ]] ; then
+ LIBDIR=$(basename "$(canonicalise "${ROOT}/usr/lib")")
+ else
+ LIBDIR="lib"
+ fi
+
for fn in $(find "${D}" -type f \
\( -perm -0100 -or -perm -0010 -or -perm -0001 -or -name '*.so' -or -name '*.so.*' \)); do
local ft=$(file "${fn}")
@@ -49,7 +55,7 @@ builtin_strip()
fi
elif [[ ${ft} == *"SB executable"* || ${ft} == *"SB shared object"* ]]; then
if [[ "${PALUDIS_DEBUG_BUILD}" == "split" ]] ; then
- local fd="${D}usr/lib/debug/${fn:${#D}}.debug"
+ local fd="${D}usr/${LIBDIR}/debug/${fn:${#D}}.debug"
mkdir -p "$(dirname "${fd}" )"
echo ${OBJCOPY} --only-keep-debug "${fn}" "${fd}"
${OBJCOPY} --only-keep-debug "${fn}" "${fd}"