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 8F5C3138010 for ; Wed, 3 Oct 2012 02:58:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 09FFEE01C5; Wed, 3 Oct 2012 02:57:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 10548E01A3 for ; Wed, 3 Oct 2012 02:57:09 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 6961E33C224; Wed, 3 Oct 2012 02:57:09 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] About disabling DISABLE_DEPRECATED Date: Tue, 2 Oct 2012 22:57:10 -0400 User-Agent: KMail/1.13.7 (Linux/3.5.2; KDE/4.6.5; x86_64; ; ) Cc: Gilles Dartiguelongue References: <1349041445.23985.20.camel@kanae> In-Reply-To: <1349041445.23985.20.camel@kanae> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2469949.pdIA3cgu0D"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201210022257.11549.vapier@gentoo.org> X-Archives-Salt: 43f5fb39-c43e-46dc-8e16-a6484139353a X-Archives-Hash: c3bcdf23c279a3a04cae70a5395a4e52 --nextPart2469949.pdIA3cgu0D Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Sunday 30 September 2012 17:44:05 Gilles Dartiguelongue wrote: > +# @USAGE: gnome2_disable_deprecation_warning no need for this > + for makefile in $(find "${S}" -name "Makefile.in" \ > + -o -name "Makefile.am" -o -name "Makefile.decl" | sort); do `local makefile` missing. also, this does not preserve quoting. you would= =20 have to do: while read makefile ; do ... done < <(find ...) > + if ! grep -qE "(DISABLE_DEPRECATED|GSEAL_ENABLE)" "${makefile}"; then `grep -E` -> `egrep` > + LC_ALL=3DC sed -e 's:-D[A-Z_]\+_DISABLE_DEPRECATED:$(NULL):g' \ > + -e 's:-DGSEAL_ENABLE:$(NULL):g' \ > + -i "${makefile}" use -r instead of escaping. it's also more readable to split -e from the r= est=20 since that tends to be the meat of sed. LC_ALL=3DC sed -i -r \ -e '...' \ -e '...' \ "${makefile}" > + fails[$(( ${#fails[@]} + 1 ))]=3D"${makefile}" fails+=3D( "${makefile}" ) > + eerror "Failed to disable deprecation warnings in $makefile" ${makefile} also, if you're using eerror, this really should end in a `die`. or it sho= uld=20 use ewarn. =2Dmike --nextPart2469949.pdIA3cgu0D Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJQa6mHAAoJEEFjO5/oN/WBtbQP/jvbeedsx3RUyIk/H/dCPYBs X4/KnMlGqviv7rsVqu+mXiQGOdqu5Ldi/8BiSxbWdKRm0cSO0GLbVk8u1uYCeKKo mSAPU9o66ZRTsE5B/26gLqpjcSHt6Vb4GLpCoZ6EBdxGI9eWg2CvW9dEEWDNA53W 8KlQ+/lrYUmqSmIto1trTDWDjqwZZ7iaP1X6EPrK41qjsQBtgmMNzt63jBcxZY1b JZiA5pkh+l+JvjVjMEt2AzbrRJZ/3X3Es5JK36lNUCDaUT5cNNARq+qUYGsXtaR/ jWfMcQSgI9omEsdUe36y5foaR7AZu//HsO9GqiK+a+5+4Mfe2077YDgNBkIJBrYL 7UiOQ7KSm67gl2DcxlbZxUDYi2Yr2RF8DAd2izMd7KpHTN25iusnAyRO4NsYBgXG tOC2NhbRtwB6kj8h1Hjq8HtQbaqQfPbDeThAMVgudNnbUJoPRvEFrArVwXeHSc3F rzzuqQ2e6OHnSccbGx7m4xvEg7MYv3dw6mkwg5s1jb4Acl68brSGaIADBYJRVihB pEgGywhhsaE5sDmj5dc1ckEubDyoJE9b/XBDVhCb87THaH43nXqzWxu4xD/b/e+r 9q8cH2JcVw5+Va5QHgjk/NYOVS1aYG9FDOrkeFEj5wTrDY9Ip3l4IGGEHe1aqTOU cHOZCscCwnWzpF35Y41z =kexO -----END PGP SIGNATURE----- --nextPart2469949.pdIA3cgu0D--