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 E4E97138262 for ; Mon, 23 May 2016 20:14:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A591E23402E; Mon, 23 May 2016 20:14:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6FBE7234004 for ; Mon, 23 May 2016 20:14:17 +0000 (UTC) Received: from pomiot (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 9B4E2340A99; Mon, 23 May 2016 20:14:15 +0000 (UTC) Date: Mon, 23 May 2016 22:14:03 +0200 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: Patrice Clement Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] git-r3.eclass: Support EGIT_SUBMODULES to filter used submodules, #497164 Message-ID: <20160523221403.55dfeb20.mgorny@gentoo.org> In-Reply-To: <20160523200603.GH16750@ultrachro.me> References: <20160523195419.11522-1-mgorny@gentoo.org> <20160523200603.GH16750@ultrachro.me> Organization: Gentoo X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) 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; micalg=pgp-sha512; boundary="Sig_/wBiRQfFUq89TiX6U.EmQz6Q"; protocol="application/pgp-signature" X-Archives-Salt: 7e722e47-fc65-4a15-a59b-49efe805cfbc X-Archives-Hash: c7ec6abdfa64794f13627c4cf20ec46b --Sig_/wBiRQfFUq89TiX6U.EmQz6Q Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, 23 May 2016 22:06:03 +0200 Patrice Clement wrote: > Monday 23 May 2016 21:54:19, Micha=C5=82 G=C3=B3rny wrote : > > --- > > eclass/git-r3.eclass | 53 ++++++++++++++++++++++++++++++++++++++++++++= +++++++- > > 1 file changed, 52 insertions(+), 1 deletion(-) > >=20 > > diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass > > index 957ff08..61218a8 100644 > > --- a/eclass/git-r3.eclass > > +++ b/eclass/git-r3.eclass > > @@ -165,6 +165,36 @@ fi > > # > > # EGIT_CHECKOUT_DIR=3D${WORKDIR}/${P} > > =20 > > +# @ECLASS-VARIABLE: EGIT_SUBMODULES > > +# @DEFAULT_UNSET > > +# @DESCRIPTION: > > +# An array of inclusive and exclusive wildcards on submodule names, > > +# stating which submodules are fetched and checked out. Exclusions > > +# start with '-', and exclude previously matched submodules. > > +# > > +# If unset, all submodules are enabled. Empty list disables all > > +# submodules. In order to use an exclude-only list, start the array > > +# with '*'. > > +# > > +# Remember that wildcards need to be quoted in order to prevent filena= me > > +# expansion. > > +# > > +# Examples: > > +# @CODE > > +# # Disable all submodules > > +# EGIT_SUBMODULES=3D() > > +# > > +# # Include only foo and bar > > +# EGIT_SUBMODULES=3D( foo bar ) > > +# > > +# # Use all submodules except for test-* but include test-lib > > +# EGIT_SUBMODULES=3D( '*' '-test-*' test-lib ) > > +# @CODE > > +if [[ ${EGIT_SUBMODULES[@]+1} && $(declare -p EGIT_SUBMODULES) !=3D "d= eclare -a"* ]] > > +then > > + die 'EGIT_SUBMODULES must be an array.' > > +fi > > + > > # @FUNCTION: _git-r3_env_setup > > # @INTERNAL > > # @DESCRIPTION: > > @@ -243,7 +273,8 @@ _git-r3_env_setup() { > > if [[ ${EGIT_HAS_SUBMODULES} ]]; then > > eerror "EGIT_HAS_SUBMODULES has been removed. The eclass no longer n= eeds" > > eerror "to switch the clone type in order to support submodules and = therefore" > > - eerror "submodules are detected and fetched automatically." > > + eerror "submodules are detected and fetched automatically. If you ne= ed to" > > + eerror "disable or filter submodules, see EGIT_SUBMODULES." > > die "EGIT_HAS_SUBMODULES is no longer necessary." > > fi > > =20 > > @@ -357,6 +388,26 @@ _git-r3_set_submodules() { > > l=3D${l#submodule.} > > local subname=3D${l%%.url=3D*} > > =20 > > + # filter out on EGIT_SUBMODULES > > + if declare -p EGIT_SUBMODULES &>/dev/null; then > > + local p res=3D l_res =20 >=20 > Watch out for the extra space. Just moved through the line back and forth in vim and I don't see any extra space... --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/wBiRQfFUq89TiX6U.EmQz6Q Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJXQ2SLXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZOHV8P/jcKrDoxTjl36OIgxyqmyQfY eaGMyLqIC53T/HhRo/+ztjlB3GPqR1kUfNDOAyTdgeZ9jnB0rmIWf1DuSNgMZn7i xfQFVNRtzkCY270Ojf5/oOslw/04lS5QSrhJmk0w/uGgL6FZbyRcHXZcW8xmf7fc 3p3YPrI4DqhzqNslcpc3k9nMV9wMCcUOvLqD+UdVcvGx4qqN6aWaJqRzxTze5HoC B/xDhfddFGz9S+j9rEDZGgKUXwQig5ZUiwC4XTNhyhCGVcXXQ9vHEJ1sAubhn84w Mu6Xr1zP4Kt0RscHD2pOSlLvCPqZmu+C4fnQm6AA4cn0KEa3Qyl6NfOHgwgCVN+m vpm1j6pY0t+ncLjUqfQEihN6YfiC1JTOK0OSLyiwwLutlZxPzyyumgAmU6cONsVx IlcK6+mTBUw74Ft7OqtFSW941PEJPP3hu8OrO7WzDqHdm61eEPlbFImKpqAZxMk8 HpIpmRWWY7h5Q+iWkscAWVw55q13eOqktz1GhyeDQxdPr/NHAj1sdAVd0ic5tUQF meJ+totjbqP8CjN5JgKUKYv8ePHC/CU5LWhOWH+rAQpTzn0SbLjhGeU0gyAUrvT/ 3WUxXM/82hA0ie2PBtTDqc+UIpjUCQyImT0WB9CUryh+v260+2JGMxTHAWg3SCg5 ulGZ59vwoEzWg9pph8w4 =1jnf -----END PGP SIGNATURE----- --Sig_/wBiRQfFUq89TiX6U.EmQz6Q--