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 298611384B4 for ; Mon, 30 Nov 2015 17:34:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2134B21C0C7; Mon, 30 Nov 2015 17:33:37 +0000 (UTC) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9DD3221C09B for ; Mon, 30 Nov 2015 17:33:35 +0000 (UTC) Received: by lffu14 with SMTP id u14so207302168lff.1 for ; Mon, 30 Nov 2015 09:33:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=ymlF4X/vQ6YaeHbbA3YlM9xDidmXFffK4ez4mIXjD8g=; b=WDMMao+IiyTd+xZ7KpyuDUKHy1QgQuGGq5vw7VWO7p/Ymcr6nboj4YQd++JKHU9Zn8 rYqRNiqVAs3I0wOCUDg65O205Y5WQq964tfRLB1vnmzFJR96Idtc6c9OL8wdeUCD4Qor 5JOoOXMuaNTGFoDG6lJQ7gm02dF8d1gq/5VGXzFO+AkF8nY6SCdIERe6zJX/JvaK3+2I lYrZPpQl0D7dWCcS6XzOVIcHNIqvzMsRiOIeAxdE7l/hGHvxEcoazF0vM+o8gAPOy2Ky XU9dX7Gm/3jXTHap3WmkbrQ6X/hbydg8fryiG8i/+SHTvubfuD9zGop1TNUXbp3IFqmT ZeBA== X-Received: by 10.112.138.10 with SMTP id qm10mr21518506lbb.139.1448904813417; Mon, 30 Nov 2015 09:33:33 -0800 (PST) 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 Sender: davidepesa@gmail.com Received: by 10.112.137.232 with HTTP; Mon, 30 Nov 2015 09:33:13 -0800 (PST) In-Reply-To: <22107.62027.57796.708914@a1i15.kph.uni-mainz.de> References: <22106.64938.215501.17191@a1i15.kph.uni-mainz.de> <22107.11375.846871.672757@a1i15.kph.uni-mainz.de> <22107.62027.57796.708914@a1i15.kph.uni-mainz.de> From: Davide Pesavento Date: Mon, 30 Nov 2015 18:33:13 +0100 X-Google-Sender-Auth: D0uYIGKaeKVwOffgCTH0pS1hnkc Message-ID: Subject: Re: [gentoo-dev] [PATCH] eutils.eclass: In EAPI conditionals, replace "has" by case statements. To: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: 33192754-0808-4149-88d8-3c10e4fe8a39 X-Archives-Hash: d72b781a8cf8c095905af3c0abc823f8 On Mon, Nov 30, 2015 at 7:52 AM, Ulrich Mueller wrote: >>>>>> On Mon, 30 Nov 2015, Davide Pesavento wrote: > >>> The patch below replaces them by case statements. (Unfortunately we >>> cannot use fall-through (&;) because it is a bash 4 feature.) > >> Sounds reasonable, although I'd find an 'if' clause slightly more >> readable, since there wouldn't be an 'else' branch in 2 out of 3 >> cases. > > It is slightly more complicated to match multiple patterns with [[ ]] > because it requires multiple conditions, regexps, or extglob. We could > of course use a bracket expression like [[ ${EAPI:-0} = [012345] ]] > but I find it ugly in this context (and it won't be able to check for > EAPI 10 ;) ). Yeah I had a bracket expression in mind... which I find less ugly than a case/esac in this context. And I agree with mgorny that the EAPI=10 argument is kinda moot. Anyway, this is really not important, feel free to ignore my comment. Thanks, Davide