Invert has/hasq and use/useq implementations.
authorZac Medico <zmedico@gentoo.org>
Fri, 8 Jul 2011 16:54:09 +0000 (09:54 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 8 Jul 2011 16:54:09 +0000 (09:54 -0700)
We need to migrate away from hasq and useq since they are deprecated
(bug #199722).

bin/ebuild.sh
bin/isolated-functions.sh

index 8c301d8c9f7f14c9d38484c558f70c5924f7ca18..f9a87afe5b8aa51fbf9d1f41204c045352a0afe6 100755 (executable)
@@ -127,19 +127,19 @@ esyslog() {
        return 0
 }
 
-use() {
-       useq ${1}
+useq() {
+       use ${1}
 }
 
 usev() {
-       if useq ${1}; then
+       if use ${1}; then
                echo "${1#!}"
                return 0
        fi
        return 1
 }
 
-useq() {
+use() {
        local u=$1
        local found=0
 
index 24443ac1b89dc3d01c2e4a780d6d154a00c14973..a4bd0a95c690229af0b03f7bcbcbd52391854a3a 100644 (file)
@@ -511,19 +511,19 @@ if [[ -z ${XARGS} ]] ; then
        esac
 fi
 
-has() {
-       hasq "$@"
+hasq() {
+       has "$@"
 }
 
 hasv() {
-       if hasq "$@" ; then
+       if has "$@" ; then
                echo "$1"
                return 0
        fi
        return 1
 }
 
-hasq() {
+has() {
        [[ " ${*:2} " == *" $1 "* ]]
 }