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 1Spf7O-0002l8-Ep for garchives@archives.gentoo.org; Fri, 13 Jul 2012 12:37:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 126AFE06FC; Fri, 13 Jul 2012 12:36:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 63D03E068C for ; Fri, 13 Jul 2012 12:35:05 +0000 (UTC) Received: from localhost (unknown [200.89.69.133]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aballier) by smtp.gentoo.org (Postfix) with ESMTPSA id D59481B4018 for ; Fri, 13 Jul 2012 12:35:03 +0000 (UTC) Date: Fri, 13 Jul 2012 08:34:56 -0400 From: Alexis Ballier To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] RFC: using array variables in qt4-r2.eclass Message-ID: <20120713083456.61c78c04@gentoo.org> In-Reply-To: References: Organization: Gentoo X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; 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: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 88b5310d-7691-412d-a455-d60c08672c67 X-Archives-Hash: dd20d767afb3e46096a258b988cc6edb On Fri, 13 Jul 2012 20:02:19 +0800 Ben de Groot wrote: > --- /usr/portage/eclass/qt4-r2.eclass 2012-04-20 > 07:01:13.000000000 +0800 +++ qt4-r2.eclass.new 2012-07-13 > 19:45:59.259773917 +0800 @@ -19,6 +19,22 @@ > > export XDG_CONFIG_HOME="${T}" > > +# @ECLASS-VARIABLE: DOCS > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# Array containing documents passed to dodoc command. > +# Paths can be absolute or relative to ${S}. > +# > +# Example: DOCS=( ChangeLog README "${WORKDIR}/doc_folder/" ) > + > +# @ECLASS-VARIABLE: HTML_DOCS > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# Array containing documents passed to dohtml command. > +# Paths can be absolute or relative to ${S}. > +# > +# Example: HTML_DOCS=( "doc/document.html" "${WORKDIR}/html_folder/" > ) + > # @ECLASS-VARIABLE: LANGS > # @DEFAULT_UNSET > # @DESCRIPTION: > @@ -44,6 +60,21 @@ > done > unset x > > +# @ECLASS-VARIABLE: PATCHES > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# Array variable containing all the patches to be applied. This > variable +# is expected to be defined in the global scope of ebuilds. > Make sure to +# specify the full path. This variable is used in > src_prepare phase. +# > +# Example: > +# @CODE > +# PATCHES=( > +# "${FILESDIR}/mypatch.patch" > +# "${FILESDIR}/mypatch2.patch" > +# ) > +# @CODE > + this sounds like re-ordering and improving comments, no functional change, right ? [...] > + # backward compatibility for non-array variables > + if [[ -n ${DOCS} ]] && [[ "$(declare -p DOCS 2>/dev/null > 2>&1)" != "declare -a"* ]]; then > + dodoc ${DOCS} || die "dodoc failed" > + fi > + if [[ -n ${HTML_DOCS} ]] && [[ "$(declare -p HTML_DOCS > 2>/dev/null 2>&1)" != "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) +1 for the whole thing btw A.