From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C1BCA138010 for ; Tue, 30 Oct 2012 20:52:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6BC8B21C106; Tue, 30 Oct 2012 20:51:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D9C0F21C106 for ; Tue, 30 Oct 2012 20:51:46 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1346633D941 for ; Tue, 30 Oct 2012 20:51:46 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 559) id CB67221600; Tue, 30 Oct 2012 20:51:44 +0000 (UTC) From: "Mike Frysinger (vapier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, vapier@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: flag-o-matic.eclass X-VCS-Directories: eclass X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20121030205144.CB67221600@flycatcher.gentoo.org> Date: Tue, 30 Oct 2012 20:51:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 67e1c8f3-5e99-44ce-8cf6-2b6724e308dd X-Archives-Hash: 7ea97ca68bb9f0fdfbee0b7925504722 vapier 12/10/30 20:51:44 Modified: flag-o-matic.eclass Log: strip-flags: revert previous commit as it was unnecessary; fix _is_flagq to handle arrays #440306 by Mr. Bones. Revision Changes Path 1.179 eclass/flag-o-matic.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.179&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.179&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.178&r2=1.179 Index: flag-o-matic.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v retrieving revision 1.178 retrieving revision 1.179 diff -u -r1.178 -r1.179 --- flag-o-matic.eclass 30 Oct 2012 20:20:37 -0000 1.178 +++ flag-o-matic.eclass 30 Oct 2012 20:51:44 -0000 1.179 @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.178 2012/10/30 20:20:37 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.179 2012/10/30 20:51:44 vapier Exp $ # @ECLASS: flag-o-matic.eclass # @MAINTAINER: @@ -265,8 +265,9 @@ } _is_flagq() { - local x - for x in ${!1} ; do + local x var + eval var=\""\${$1[*]}"\" + for x in ${var} ; do [[ ${x} == $2 ]] && return 0 done return 1 @@ -370,7 +371,7 @@ done # In case we filtered out all optimization flags fallback to -O2 - if _is_flagq ${var} "-O*" && ! (_is_flagq new "-O*" || _is_flagq new -O) ; then + if _is_flagq ${var} "-O*" && ! _is_flagq new "-O*" ; then new+=( -O2 ) fi