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 C8FE01384B4 for ; Fri, 1 Jan 2016 17:42:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D486D21C050; Fri, 1 Jan 2016 17:42:45 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D073421C017 for ; Fri, 1 Jan 2016 17:42:44 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aF3is-0007dW-HX for gentoo-dev@lists.gentoo.org; Fri, 01 Jan 2016 18:42:42 +0100 Received: from ppp118-209-65-208.lns20.mel4.internode.on.net ([118.209.65.208]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 01 Jan 2016 18:42:42 +0100 Received: from kensington by ppp118-209-65-208.lns20.mel4.internode.on.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 01 Jan 2016 18:42:42 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org From: Michael Palimaka Subject: [gentoo-dev] Re: [PATCH 01/15] scons-utils.eclass: Modernize the example not to rely on myescons... Date: Sat, 2 Jan 2016 04:42:31 +1100 Message-ID: References: <1451666481-22145-1-git-send-email-mgorny@gentoo.org> <1451666481-22145-2-git-send-email-mgorny@gentoo.org> <20160101181525.4aee6ea0.mgorny@gentoo.org> 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=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ppp118-209-65-208.lns20.mel4.internode.on.net X-Enigmail-Draft-Status: N1110 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 In-Reply-To: <20160101181525.4aee6ea0.mgorny@gentoo.org> X-Archives-Salt: e3c51257-d35c-42e9-856d-fff0e6f9b8be X-Archives-Hash: 814c2b31e0d7740c5e50a53e4e39092a On 02/01/16 04:15, Michał Górny wrote: > On Sat, 2 Jan 2016 03:57:59 +1100 > Michael Palimaka wrote: > >> On 02/01/16 03:41, Michał Górny wrote: >>> --- >>> eclass/scons-utils.eclass | 8 ++++---- >>> 1 file changed, 4 insertions(+), 4 deletions(-) >>> >>> diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass >>> index a2a6884..e1b3a1b6 100644 >>> --- a/eclass/scons-utils.eclass >>> +++ b/eclass/scons-utils.eclass >>> @@ -1,4 +1,4 @@ >>> -# Copyright 1999-2012 Gentoo Foundation >>> +# Copyright 1999-2015 Gentoo Foundation >>> # Distributed under the terms of the GNU General Public License v2 >>> # $Id$ >>> >>> @@ -17,19 +17,19 @@ >>> # EAPI=4 >>> # >>> # src_configure() { >>> -# myesconsargs=( >>> +# MYSCONS=( >>> # CC="$(tc-getCC)" >>> # $(use_scons nls ENABLE_NLS) >>> # ) >>> # } >>> # >>> # src_compile() { >>> -# escons >>> +# escons "${MYSCONS[@]}" >>> # } >>> # >>> # src_install() { >>> # # note: this can be DESTDIR, INSTALL_ROOT, ... depending on package >>> -# escons DESTDIR="${D}" install >>> +# escons "${MYSCONS[@]}" DESTDIR="${D}" install >>> # } >>> # @CODE >>> >>> >> >> What is the benefit of MYSCONS vs myesconsargs? The latter seems to be >> more consistent with other eclasses (mycmakeargs, myqmakeargs, ...) > > It's shorter and follows the convention of keeping global variables > uppercase. The five-character saving is lost by then requiring "${myconf[@]}" to be written twice. > Consistency with bad example set by one eclass is not a good argument. > In fact, cmake-utils sets a very bad example of enforcing declarative > model over function-oriented ebuilds which results in really absurd > src_configure() implementations. > > src_configure() { > local mycmakeargs=( > ... > ) > cmake-utils_src_configure > } > > vs > > src_configure() { > local myconf=( > ... > ) > ecmake "${myconf[@]}" > } > I don't see the absurdity.