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 815CE13888F for ; Sat, 17 Oct 2015 17:49:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 235B521C016; Sat, 17 Oct 2015 17:49:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 09743E085C for ; Sat, 17 Oct 2015 17:49:38 +0000 (UTC) Received: from mail-yk0-f170.google.com (mail-yk0-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mattst88) by smtp.gentoo.org (Postfix) with ESMTPSA id EB3DE340885 for ; Sat, 17 Oct 2015 17:49:35 +0000 (UTC) Received: by ykfy204 with SMTP id y204so111216829ykf.1 for ; Sat, 17 Oct 2015 10:49:33 -0700 (PDT) X-Received: by 10.129.55.209 with SMTP id e200mr2264551ywa.120.1445104173653; Sat, 17 Oct 2015 10:49:33 -0700 (PDT) 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.37.210.76 with HTTP; Sat, 17 Oct 2015 10:49:13 -0700 (PDT) In-Reply-To: <20151017193730.346decf4.mgorny@gentoo.org> References: <1444923887-10794-1-git-send-email-kensington@gentoo.org> <9A3C8A48-2095-4CEE-BE03-268DEEEE7303@gentoo.org> <20151017193730.346decf4.mgorny@gentoo.org> From: Matt Turner Date: Sat, 17 Oct 2015 10:49:13 -0700 Message-ID: Subject: Re: [gentoo-dev] Re: [PATCH] cmake-utils.eclass: die if ninja is enabled but not installed To: gentoo development Cc: Michael Palimaka Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 2941f00a-f62a-4e7c-bbd1-fd8f2ea34c0a X-Archives-Hash: 8d9c17cca36aad9978115f476bd1a45f On Sat, Oct 17, 2015 at 10:37 AM, Micha=C5=82 G=C3=B3rny wrote: > On Fri, 16 Oct 2015 03:22:48 +1100 > Michael Palimaka wrote: > >> On 16/10/15 03:04, Micha=C5=82 G=C3=B3rny wrote: >> > >> > >> > Dnia 15 pa=C5=BAdziernika 2015 17:44:47 CEST, Michael Palimaka napisa=C5=82(a): >> >> This could happen if ninja is manually enabled (eg. make.conf) but no= t >> >> installed >> >> --- >> >> eclass/cmake-utils.eclass | 5 +++++ >> >> 1 file changed, 5 insertions(+) >> >> >> >> diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass >> >> index 480cd09..012b13f 100644 >> >> --- a/eclass/cmake-utils.eclass >> >> +++ b/eclass/cmake-utils.eclass >> >> @@ -228,6 +228,11 @@ _generator_to_use() { >> >> >> >> case ${CMAKE_MAKEFILE_GENERATOR} in >> >> ninja) >> >> + # if ninja is enabled but not installed, the build= could fail >> >> + # this could happen if ninja is manually enabled (= eg. make.conf) >> >> but not installed >> >> + if ! has_version dev-util/ninja; then >> > >> > I'd suggest avoiding has_version and just checking for the binary. typ= e -P, I think. Ciaran can give you the rationale, I believe. >> >> There's no guarantee that the binary will be provided by dev-util/ninja >> (we've had a bug about this already). > > Excuse me but did you agree with me, then commit the old version anyway? I didn't seem like he agreed with you. He explained that checking for a binary named ninja isn't sufficient because some versions of net-irc/ninja install a 'ninja' binary. See bug https://bugs.gentoo.org/show_bug.cgi?id=3D436804