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 5F8051384B4 for ; Sun, 29 Nov 2015 23:29:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 02DBE21C051; Sun, 29 Nov 2015 23:29:29 +0000 (UTC) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) (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 02E2021C043 for ; Sun, 29 Nov 2015 23:29:27 +0000 (UTC) Received: by lfaz4 with SMTP id z4so176909175lfa.0 for ; Sun, 29 Nov 2015 15:29:26 -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=7tsq0TC4pmufuybfYFOb0CUidElV7XbgIvJT+ucXddI=; b=ZgbfeTwGPgz871upuoXLVIZJmhp0k++zwUYUHmNjjrHDzg7oF1uA/SWZuNnwj4Q5/3 aa5ccwSJZ/NnITf5UCRFbRHe/8t08U7wNzAVwabkQ3jcsM2bxLWMG5o7MF3Tsx4jF2EH kZdm0xOxn/USyh7R+etLeYeZLRxu/ADH8ue3GBTzMyjz5wDwxlJCfTWb0UmIsn9+cCv+ r0fQg1L3tLkq46GojF2qQaNoTbO4iw+LM4H76atafm00rtNkJAMYq5kqJQkitX53N+N4 tvu4gJDiPE1kC4ysqklvdP4tRPUYXtSIHg4q6tQ/QqCbbG2kas5tFM1l6a8My86bSKGM VPyg== X-Received: by 10.112.156.194 with SMTP id wg2mr24213981lbb.19.1448839766406; Sun, 29 Nov 2015 15:29:26 -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; Sun, 29 Nov 2015 15:29:06 -0800 (PST) In-Reply-To: <22107.11375.846871.672757@a1i15.kph.uni-mainz.de> References: <22106.64938.215501.17191@a1i15.kph.uni-mainz.de> <22107.11375.846871.672757@a1i15.kph.uni-mainz.de> From: Davide Pesavento Date: Mon, 30 Nov 2015 00:29:06 +0100 X-Google-Sender-Auth: hFTCSVtKa_6r-5eEu0XYBO-QUKg 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: 8386ca31-779a-4186-9aad-8294924cef3b X-Archives-Hash: a5684f5b34e3bddf6222a2560213abee On Sun, Nov 29, 2015 at 5:48 PM, Ulrich Mueller wrote: > As suggested by mgorny, we could use bash internals instead of the > "has" function calls in global scope. > > 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. Thanks, Davide