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.77) (envelope-from ) id 1SqQsM-000353-3j for garchives@archives.gentoo.org; Sun, 15 Jul 2012 15:36:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9F8C221C004; Sun, 15 Jul 2012 15:36:36 +0000 (UTC) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 3D01DE0720 for ; Sun, 15 Jul 2012 15:36:05 +0000 (UTC) Received: by pbbrr13 with SMTP id rr13so9928898pbb.40 for ; Sun, 15 Jul 2012 08:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=NmyxrKMT4L52nxoWNGvtIyKGnlVXCLA67agHsr+pfEA=; b=ar/XsdVerf4eWR0Cv0zSHUxTBkUHf5Y678EwsafFml+uDqGP3L1ah68DMG8ED9D5lg SzlcXXcsGaNIVownG2yKBsAEV7MbRCnmuGlRMXYBdAUbUI7j0L0bTfMua8ZyHTh11B/f wdUtrfsB6yA6L/FbzWFtVNczArjp4m+EQSifY4SU2wUNgBppsfP0zC6cRWEkbp6crT28 tNrIGZWJSEDGLZ9cTxfRI8pk2M9fccdl5E0AE1uxyZQ0TV2s+nLU6rSuinIvKwUXFHeH FSIaOo/Ew49HEobKLuULmcG/bB2xPRz5gtUezH6IQAJIFJY1ZV3R1JIhtf32yUXDwkQU TtAA== 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 Received: by 10.68.130.67 with SMTP id oc3mr20238745pbb.18.1342366565477; Sun, 15 Jul 2012 08:36:05 -0700 (PDT) Sender: davidepesa@gmail.com Received: by 10.66.41.51 with HTTP; Sun, 15 Jul 2012 08:36:05 -0700 (PDT) In-Reply-To: <20120715154202.09edb560@pomiocik.lan> References: <20120713083456.61c78c04@gentoo.org> <20120713095057.186f3dc3@gentoo.org> <20120714160042.7e8ea9b8@pomiocik.lan> <20120715154202.09edb560@pomiocik.lan> Date: Sun, 15 Jul 2012 17:36:05 +0200 X-Google-Sender-Auth: 868Vlt38gIZCNVrg5D_6D8w0TW0 Message-ID: Subject: Re: [gentoo-dev] RFC: using array variables in qt4-r2.eclass From: Davide Pesavento To: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= Cc: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 9de0a194-250f-4d87-a53e-0814ed796777 X-Archives-Hash: 85bc1cccc2514638ed5f9ac36c0cd5f7 On Sun, Jul 15, 2012 at 3:42 PM, Micha=C5=82 G=C3=B3rny = wrote: > On Sun, 15 Jul 2012 13:00:47 +0200 > Davide Pesavento wrote: > >> On Sat, Jul 14, 2012 at 4:00 PM, Micha=C5=82 G=C3=B3rny >> wrote: >> > On Sat, 14 Jul 2012 12:29:59 +0200 >> > Davide Pesavento wrote: >> > >> >> On Fri, Jul 13, 2012 at 3:50 PM, Alexis Ballier >> >> wrote: >> >> > On Fri, 13 Jul 2012 15:26:58 +0200 >> >> > Davide Pesavento wrote: >> >> > >> >> >> > [...] >> >> >> >> + # backward compatibility for non-array variables >> >> >> >> + if [[ -n ${DOCS} ]] && [[ "$(declare -p DOCS >> >> >> >> 2>/dev/null >> >> >> >> 2>&1)" !=3D "declare -a"* ]]; then >> >> >> >> + dodoc ${DOCS} || die "dodoc failed" >> >> >> >> + fi >> >> >> >> + if [[ -n ${HTML_DOCS} ]] && [[ "$(declare -p HTML_DOCS >> >> >> >> 2>/dev/null 2>&1)" !=3D "declare -a"* ]]; then >> >> >> >> + dohtml -r ${HTML_DOCS} || die "dohtml failed" >> >> >> >> + fi >> >> >> >> } >> >> >> > >> >> >> > maybe issue an eqawarn in that case telling people to convert >> >> >> > to arrays; some time later make this an ewarn telling >> >> >> > non-array support will be removed and again later make this a >> >> >> > die :) (if you take that route i would expect you to start >> >> >> > converting packages to use arrays) >> >> >> > >> >> >> >> >> >> We have no intention of deprecating non-array variables in >> >> >> qt4-r2 eclass. >> >> > >> >> > why ? having two codepaths for the same thing, one being >> >> > inferior, sounds like a good reason to deprecate the inferior >> >> > one :) >> >> > >> >> > A. >> >> > >> >> >> >> Maintaining these two codepaths has practically zero cost, while >> >> forcing every ebuild using qt4-r2 to switch to arrays would waste >> >> developers' time which is better spent elsewhere. >> >> >> >> Furthermore, the non-array variant is not necessarily inferior, >> >> because it allows you to use bash globbing, brace expansion, etc... >> > >> > And arrays stopped to allow that overnight? >> > >> >> I mean that the following won't work as you might expect: >> >> DOCS=3D("*.txt") > > I doubt anyone would expect quoted string to be evaluated as glob. > It depends on when the expansion is performed, although in the base.eclass case, DOCS=3D(*.txt) doesn't work either, because the quoting happens inside the eclass function. Anyway, I was just explaining why I argued that "the non-array variant is not necessarily inferior". Using DOCS=3D"*.txt" is actually a supported use case and a valid reason not to deprecate non-array variables. Regards, Pesa