Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1628584rwb; Fri, 13 Jan 2023 15:18:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXu6X7vEcrlmJ9kEoMaUXK4L1kZIq7Uk/GYDjr1cGWj5Wjj0KjDM7FSPHMO0C6H0PrWrYwLz X-Received: by 2002:a17:906:99d1:b0:7c0:ff76:dc12 with SMTP id s17-20020a17090699d100b007c0ff76dc12mr54141664ejn.2.1673651896824; Fri, 13 Jan 2023 15:18:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673651896; cv=none; d=google.com; s=arc-20160816; b=vFrjK1cQ+rVM4CGqxKvrqmy/sTpWIUDB6KZprU4jvsrNXFMoC1Vo8DGpapht9kap2y IDMiOrt88SltWtYNKN2+lWlwUx9LwtgEzgI+gCF0zD7nPVvRAcfGge68QZ9bgfSq7zmb oPKl8x8BvZRlrhZqEh8O9cIrukp1f9rq9fgxcCJpSZXGOGNGQN+ek6herzTcGx8wYpZB Ap1LXx/OxpHsGH/W0OH6O3G3bNC7WZUKHuiS4vZ4pZNrCeAigoSx++x2q31i5EoDtzkh TN4zFRW+YJQHa36vbw45PsNfAQpnoC3jDId0IOhJPF8KLpZXNKbWAKTp701v+CjIy2wH Oxfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jcttPvIOqjLZM9F4gnEg1fZ9duaMxSmsJ9dAT4eVMto=; b=lgBinkS58ZeAPqBaYEihs41aIA8F4SLj9QSa+QYEcA8NmQNyawNFM0ibqam6jd8ltx Ybll59/NEeHinxwuN9jBhBN6yYx7YUbqCfCGqhVf0e99C+rlVCS+jM3BSyrln6eaQl5E Ro+UgaeccKpNAJkRgw4iFe7Abc1SBe/vlTxaxzosFZJ3sJvHzS/fXkkG07CYxDZB1vF4 ORU9QTWWtRejc3OxnICMh5+Ad4D2QVRb2fHy6oFlyQ1INnFWf316CJHhC0mpCJ6quuKy wX70Cn1r7oDTFv3AJitYYGXZR+zPpKvV1+TTwLVYVT3XK9RLnmlABsLse5Bd9JI/BDcK VLQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fsQRQYaY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n9-20020a056402514900b00490df3bd87fsi20613262edd.219.2023.01.13.15.18.04; Fri, 13 Jan 2023 15:18:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fsQRQYaY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229509AbjAMXNa (ORCPT + 52 others); Fri, 13 Jan 2023 18:13:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231258AbjAMXNH (ORCPT ); Fri, 13 Jan 2023 18:13:07 -0500 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1267552C6A; Fri, 13 Jan 2023 15:13:06 -0800 (PST) Received: by mail-yb1-xb29.google.com with SMTP id 188so24140437ybi.9; Fri, 13 Jan 2023 15:13:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jcttPvIOqjLZM9F4gnEg1fZ9duaMxSmsJ9dAT4eVMto=; b=fsQRQYaY5XCcHXaWXRuTKkkyaOlhbgd5f9J9NehHJt1yDL6jWOLYtP00oTRQM8X+EV PzZ6b4gUaeBWZxDXhZMhuoJ3vCgOeOE6bDFdzqZR3KtOec9HxcSj0PNS0HwqXuitKp8c 4kKB4jD6svKgKQTIfr6q0I8SLgfQUWYjy0kovaXnuIulrJ2r5AQNed402wSVDtZjqCCY sxtDD+P5whbyeTs7N5+4xrykU1o9ZVG8tNmjvtebpKted2crhPWLNXxKC4nzt8epMRDP bGraUhX3drBGhmKqjmhnUtLH53UboTzKhyjma5AAYJjiOBwEO/bgrzl24YM0vy+Ck0vT hppg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jcttPvIOqjLZM9F4gnEg1fZ9duaMxSmsJ9dAT4eVMto=; b=YXT9mCNHHXHRJFlRNYv+9vt9T6f51w0zdNqryl8VMOj8B4xxnCVXhLZT+BBBCEwdAO usypbdPwhub7c2vvmJH1MUBG2lNJkO1UkYfIGoyQ1P1rbF4Iw4SswsW+rHvF+qiZF45f CUFUz9hxTD5R8X3FLqbEXaT3l7XRrHpcyArcPe2o8pKqlQ/eCbY18NZV0MiofPD3rGzt EZRrZ/E959E0+prxn7JZYHN7T6yTcWr8JeDjWmEk1kDI474hmherMKdjtB1xOgkiKF6I lyLeS7Z75MXNhUi/Hrj39GB1E9QzUdDLGBiE/fvbH9GurBYXo6MRMvpZmizB0/x7N+PS Up4g== X-Gm-Message-State: AFqh2kqm4kwDj1/j1pODKM7Kq9H2oJkwAaCQb82zRAcjR7bCvRfbRhM4 lrWyO/bwKsMub0o0cPJRw59h+CjUxgBhSfC8v9I= X-Received: by 2002:a25:e6c7:0:b0:7cb:dfbe:3996 with SMTP id d190-20020a25e6c7000000b007cbdfbe3996mr615970ybh.489.1673651585333; Fri, 13 Jan 2023 15:13:05 -0800 (PST) MIME-Version: 1.0 References: <20230109204520.539080-1-ojeda@kernel.org> <20230109204520.539080-5-ojeda@kernel.org> In-Reply-To: From: Miguel Ojeda Date: Sat, 14 Jan 2023 00:12:54 +0100 Message-ID: Subject: Re: [PATCH 5/6] kbuild: rust_is_available: fix confusion when a version appears in the path To: Masahiro Yamada Cc: Miguel Ojeda , linux-kbuild@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Nicolas Schier , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 12, 2023 at 6:32 AM Masahiro Yamada wrote: > > +set -- ${bindgen_libclang_output#**clang version} > +bindgen_libclang_cversion=$(get_canonical_version $1) > bindgen_libclang_min_version=$($min_tool_version llvm) > -bindgen_libclang_cversion=$(get_canonical_version $bindgen_libclang_version) Nice trick :) To be honest, I am not really fond of `set`, and in this case it means the command is not symmetric (we remove the prefix using parameter expansion, and the suffix via positional argument selection), but if you prefer it that way, I think it would be fine. However, why the double asterisk? One already matches any string, including spaces, no? Cheers, Miguel