summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-10-09 18:53:53 -0400
committerMike Frysinger <vapier@gentoo.org>2011-10-09 22:27:58 -0400
commit2e6fa11b074d67ebeb799210256d4716d6655a97 (patch)
tree8760d8bb04a9bb343152d2ddfefc5da13b0a4d65
parent4311d7785a2595501dd07c9daa7d8051cee8de40 (diff)
downloadportage-2e6fa11b074d67ebeb799210256d4716d6655a97.tar.gz
portage-2e6fa11b074d67ebeb799210256d4716d6655a97.tar.bz2
portage-2e6fa11b074d67ebeb799210256d4716d6655a97.zip
prepstrip: merge debugedit checks
Avoid checking for debugedit multiple times. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-xbin/ebuild-helpers/prepstrip11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 5f0fe18fe..5167ef329 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -25,11 +25,6 @@ export SAFE_STRIP_FLAGS="--strip-unneeded"
export PORTAGE_STRIP_FLAGS=${PORTAGE_STRIP_FLAGS-${SAFE_STRIP_FLAGS} -R .comment}
prepstrip_sources_dir=/usr/src/debug/${CATEGORY}/${PF}
-if has installsources ${FEATURES} && ! type -P debugedit >/dev/null ; then
- ewarn "FEATURES=installsources is enabled but the debugedit binary could not"
- ewarn "be found. This feature will not work unless debugedit is installed!"
-fi
-
unset ${!INODE_*}
inode_var_name() {
@@ -43,7 +38,11 @@ inode_var_name() {
save_elf_sources() {
has installsources ${FEATURES} || return 0
has installsources ${RESTRICT} && return 0
- type -P debugedit >/dev/null || return 0
+ if ! type -P debugedit >/dev/null ; then
+ ewarn "FEATURES=installsources is enabled but the debugedit binary could not"
+ ewarn "be found. This feature will not work unless debugedit is installed!"
+ return 0
+ fi
local x=$1
local inode=$(inode_var_name "$x")