summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2006-04-16 15:28:05 +0000
committerPatrick McLean <chutzpah@gentoo.org>2006-04-16 15:28:05 +0000
commitddee1fb019afacc4489bc9f8a0dc3b0f6a89cf2d (patch)
treefdf43d531e78ea1a7814b19f6268146ce671c045 /profiles/default-linux
parenttrim whitespace (diff)
downloadgentoo-2-ddee1fb019afacc4489bc9f8a0dc3b0f6a89cf2d.tar.gz
gentoo-2-ddee1fb019afacc4489bc9f8a0dc3b0f6a89cf2d.tar.bz2
gentoo-2-ddee1fb019afacc4489bc9f8a0dc3b0f6a89cf2d.zip
Fix for bug #130120.
Diffstat (limited to 'profiles/default-linux')
-rw-r--r--profiles/default-linux/amd64/profile.bashrc8
1 files changed, 6 insertions, 2 deletions
diff --git a/profiles/default-linux/amd64/profile.bashrc b/profiles/default-linux/amd64/profile.bashrc
index 042596e91a23..b14aa8061c39 100644
--- a/profiles/default-linux/amd64/profile.bashrc
+++ b/profiles/default-linux/amd64/profile.bashrc
@@ -60,6 +60,10 @@ filter_invalid_flags() {
done
}
+bashrc_has() {
+ [[ " ${*:2} " == *" $1 "* ]]
+}
+
if [[ ${EBUILD_PHASE} == "setup" ]]; then
filter_invalid_flags
@@ -67,11 +71,11 @@ if [[ ${EBUILD_PHASE} == "setup" ]]; then
unset trigger
for flag in "${BAD_FLAGS[@]}"; do
- if has ${flag} ${CFLAGS}; then
+ if bashrc_has ${flag} ${CFLAGS}; then
trigger=1
ewarn "Your CFLAGS contain(s) \"${flag}\" which can break packages."
fi
- if has ${flag} ${CXXFLAGS}; then
+ if bashrc_has ${flag} ${CXXFLAGS}; then
trigger=1
ewarn "Your CXXFLAGS contain(s) \"${flag}\" which can break packages."
fi