From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RtFtN-0007CB-A1 for garchives@archives.gentoo.org; Fri, 03 Feb 2012 09:57:17 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7C39FE064E; Fri, 3 Feb 2012 09:57:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 20030E060F for ; Fri, 3 Feb 2012 09:56:39 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 8F4291B401F for ; Fri, 3 Feb 2012 09:56:38 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: RFC: New eclass: mozlinguas.eclass Date: Fri, 3 Feb 2012 04:56:42 -0500 User-Agent: KMail/1.13.7 (Linux/3.2.0; KDE/4.6.5; x86_64; ; ) References: In-Reply-To: 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="nextPart1394262.ad9MMqZtBr"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201202030456.43456.vapier@gentoo.org> X-Archives-Salt: f324a7f4-3f37-4f54-87f5-8ad7bc34651e X-Archives-Hash: d40c0442eed72bd2b95811ada7916d45 --nextPart1394262.ad9MMqZtBr Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable please post it inline to make review easier > # @MAINTAINER: mozilla@gentoo.org > # @AUTHOR: Nirbheek Chauhan goes on newline, not inlined > # @DESCRIPTION: Array containing the list of language pack xpis available text starts on the next line, not the existing line > # @ECLASS-VARIABLE: LANGS > # @ECLASS-VARIABLE: LANGPACK_PREFIX > # @ECLASS-VARIABLE: LANGPACK_SUFFIX these prob could use MOZ prefixes as well > : ${LANGS:=3D""} you say it's an array but then you initialize it to a string ... > if ! [[ ${PV} =3D~ alpha|beta ]]; then > for x in "${LANGS[@]}" ; do x is a global variable here ... one reason to write this as an internal fun= c=20 and then call it so you can use `local` > if [[ ${x} =3D en ]] || [[ ${x} =3D en-US ]]; then should be =3D=3D imo > SRC_URI=3D"${SRC_URI} SRC_URI+=3D"... > IUSE=3D"${IUSE} linguas_${x/-/_}" IUSE+=3D"... > mozlinguas() { missing eclass documentation > # Generate the list of language packs called "linguas" > # This list is used to unpack and install the xpi language packs shouldn't this initialize linguas=3D() ? and shouldn't it name the return value mozlinguas ? > # If this language is supported by ${P}, > elif has ${lingua} "${LANGS[@]//-/_}"; then > # Add the language to linguas, if it isn't already there > has ${lingua//_/-} "${linguas[@]}" || linguas+=3D(${lingua//_/-}) > continue > # For each short lingua that isn't in LANGS, > # We used to add *all* long LANGS to the linguas list, > # but we stopped doing that due to bug 325195. > fi indentation on these comments seem to be off > # FIXME: Add support for unpacking xpis to portage > xpi_unpack "${MOZ_P}-${x}.xpi" or, add it to the new unpacker.eclass ;) also, seems to be missing `use linguas_${x} && xpi_unpack ...` ? otherwise= ,=20 you just unpack all linguas and not just the ones the user has requested ..= =2E=20 same goes for the install ... > if [[ "${linguas[*]}" !=3D "" && "${linguas[*]}" !=3D "en" ]]; then > einfo "Selected language packs (first will be default): ${linguas[*]}" since linguas[*] will be big by default, i'd put the variable expansion int= o=20 its own einfo =2Dmike --nextPart1394262.ad9MMqZtBr 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) iQIcBAABAgAGBQJPK69bAAoJEEFjO5/oN/WByB4QAMIZVAOtuEeW3ngKV0ZejnzD SjAtwu0yfNz37XD6vI454g8HhHZ39u123PWfE8YIJYhBom6tBbVWsffzIMXOSOh6 LTE0+1QnJT0L7RcHDpVIlkRpSf2MxKqELQSOGzrjWq6o0g2ndjJNwqIpysFxtGOJ 6wlpzblIfpiRM+9PJwA3yzIx3p3aArAEfMifRoOp+lsCblwyVg+6ploOHBN9qG6s IyvGEud4IQwViW+jGVzw9+Qbp+IHWc40cs740LraFhm6+OF7h64n0rwE03uUfbj8 kDZc3VNyD7xEwd4Wgdl+XkIQNNjzffKRhIeIE7fNDungfeZhqYWiUmdOo14+H+Xs f92GuSDfMwKDcsLYKPmSCphHxJ2KjUujW3bvmoKXlkcxlgU0Ja7Ouazwq3DkNzlQ qXPT6wWSP+uV1qYuPm2xks7UJlJcoE4sPeoXSJvJnsMpV//ezR/B0MgxL85i4y5f Tdpca2Fbp1MZjb4U+NSLEegqL1DooPv0t/9FFoeJEntcJMJq8g9Ko8YeNWlYge7R q5pzkDYETiSzpzHqOApwLEPaxNsvlH4aCErTL1IJ/H1QPSzk6bXRRjquwo+TRaqZ 28EfoGtQ/OxtFnXPm3A7I7UaVCVSlBS3e9GNrG1aXDeC2utFbkILnphahKCCXn9X yrhTahrJnOVaYU3llHnK =odqz -----END PGP SIGNATURE----- --nextPart1394262.ad9MMqZtBr--