use hasq where appropriate
authorSimon Stelling <blubb@gentoo.org>
Tue, 2 May 2006 16:10:56 +0000 (16:10 -0000)
committerSimon Stelling <blubb@gentoo.org>
Tue, 2 May 2006 16:10:56 +0000 (16:10 -0000)
svn path=/main/trunk/; revision=3308

bin/prepstrip

index cd28ec1116af3b6e911db551880334ab09deeb09..0cca3292a3fdc6609f311fc369660e833b6a894b 100755 (executable)
@@ -5,9 +5,8 @@
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
-if [[ " ${FEATURES} " == *" nostrip "* ]] || \
-   [[ " ${RESTRICT} " == *" nostrip "* ]] || \
-   [[ " ${RESTRICT} " == *" strip "* ]]
+if hasq nostrip ${FEATURES} ${RESTRICT} || \
+   hasq strip RESTRICT
 then
        exit 0
 fi
@@ -25,7 +24,7 @@ save_elf_debug() {
        local x=$1
        local y="${D}/usr/lib/debug/${x:${#D}:${#x}}.debug"
 
-       [[ " ${FEATURES} " != *" splitdebug "* ]] && return 0
+       hasq splitdebug ${FEATURES} || return 0
 
        # dont save debug info twice.
        [[ ${x:7} == ".debug" ]] && return 0
@@ -35,7 +34,7 @@ save_elf_debug() {
        ${OBJCOPY} --add-gnu-debuglink="${y}" "${x}"
        chmod a-x,o-w "${y}"
 
-       [[ " ${FEATURES} " != *" installsources "* ]] && return 0
+       hasq installsources ${FEATURES} || return 0
 
        if [[ -x "/usr/bin/debugedit" ]] ; then
                debugedit -b "${WORKDIR}" -d /usr/src/debug/${PF} -l "${T}"/debug.sources "${x}"