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 1SqRUz-0000mj-16 for garchives@archives.gentoo.org; Sun, 15 Jul 2012 16:16:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 55E83E0730; Sun, 15 Jul 2012 16:16:30 +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 3C4D6E0683 for ; Sun, 15 Jul 2012 16:15:51 +0000 (UTC) Received: by pbbrr13 with SMTP id rr13so9975845pbb.40 for ; Sun, 15 Jul 2012 09:15:51 -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=Q5R7lMBhDZ28HuUZrQh2kIxlmcZ/jUAYfQU/5pkxxiw=; b=j1MxQlkyZEZwttI3bYhVA8NXV33JLNlU7nrnnhoCZTDQOkJSn6dItKK/gth2RXxRSS kq63Qaciz0aSujtO7syA86UYSnfKldCTlErBdBBLpVWgzHj3P77S46pExFbbRBBChRIq l65QY0n+79MiITG20nxDt95ieh0vdjMLZkxxqi+7h7fiJmUBE9CHiQSbSzKvrtWCrAsX 2KI1xX/kWcvO+uhSeEqD8VYu455voAnX//8nkOrQXa/BkbRkwLsNf769R/Q4lCKnusPd n4wq2OnQG0Wn2oJtpCN/vrR8WhZ4pEjsUqNgrmHbJJwqFn5SgWHIjfFiE3Ju8rPWnncX 7INA== 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.66.83.164 with SMTP id r4mr3914654pay.18.1342368951560; Sun, 15 Jul 2012 09:15:51 -0700 (PDT) Sender: davidepesa@gmail.com Received: by 10.66.41.51 with HTTP; Sun, 15 Jul 2012 09:15:51 -0700 (PDT) In-Reply-To: <20120715175336.0df6d073@pomiocik.lan> References: <20120713083456.61c78c04@gentoo.org> <20120713095057.186f3dc3@gentoo.org> <20120714160042.7e8ea9b8@pomiocik.lan> <20120715154202.09edb560@pomiocik.lan> <20120715175336.0df6d073@pomiocik.lan> Date: Sun, 15 Jul 2012 18:15:51 +0200 X-Google-Sender-Auth: FbRB7lVAebjm7FWdjYCZ2VhOFWo 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: 0fe3ca42-1e94-46b8-bec6-a29f8832d07e X-Archives-Hash: ce863c017f20a8b024a46840b804bf34 On Sun, Jul 15, 2012 at 5:53 PM, Micha=C5=82 G=C3=B3rny = wrote: > On Sun, 15 Jul 2012 17:36:05 +0200 > Davide Pesavento wrote: > >> 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. > > So, you're saying that you're going to support two different variants > of the variable which work two different ways? > Basically yes. As yngwin said, we're introducing support for array variables to be more in line with other eclasses. People do expect DOCS to be an array variable, and I've already been asked a few times for this kind of support. Thanks, Pesa