From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id DDD801F452 for ; Thu, 6 Apr 2023 03:37:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235280AbjDFDfM (ORCPT ); Wed, 5 Apr 2023 23:35:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230059AbjDFDfL (ORCPT ); Wed, 5 Apr 2023 23:35:11 -0400 Received: from cloud.peff.net (cloud.peff.net [104.130.231.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18C977AA5 for ; Wed, 5 Apr 2023 20:35:09 -0700 (PDT) Received: (qmail 11960 invoked by uid 109); 6 Apr 2023 03:35:09 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Thu, 06 Apr 2023 03:35:09 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 21760 invoked by uid 111); 6 Apr 2023 03:35:07 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Wed, 05 Apr 2023 23:35:07 -0400 Authentication-Results: peff.net; auth=none Date: Wed, 5 Apr 2023 23:35:07 -0400 From: Jeff King To: Felipe Contreras Cc: Patrick Steinhardt , Todd Zullinger , git@vger.kernel.org Subject: Re: [PATCH] global: resolve Perl executable via PATH Message-ID: <20230406033507.GA2092122@coredump.intra.peff.net> References: <20230405165414.GA497301@coredump.intra.peff.net> <20230405181505.GA517608@coredump.intra.peff.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Wed, Apr 05, 2023 at 09:18:20PM -0500, Felipe Contreras wrote: > On Wed, Apr 5, 2023 at 2:09 PM Jeff King wrote: > > On Wed, Apr 05, 2023 at 07:32:22PM +0200, Patrick Steinhardt wrote: > > > IMHO we should aim for fixing those inconsistencies, and then letting > > people set PERL_PATH as appropriate (even to something that will find it > > via $PATH if they want to). > > We can aim to fix all those inconsistencies *eventually* while in the > meantime make them runnable for most people *today*. > > It's not a dichotomy. It is if the proposed patches change the behavior in such a way as to make things less consistent. There are three plausible perls to run (whether intentionally or accidentally): 1. the one in PERL_PATH 2. /usr/bin/perl 3. the first one in $PATH What the code tries to do now is to consistently use (1). If there are cases that accidentally use (2), which is what I took Patrick's patch to mean, then that is a problem for people who set PERL_PATH to something else, but not for people who leave it as /usr/bin/perl. If we "fix" those cases by switching them to (3), then now things are less consistent for such people than when we started. But I am not clear on what those cases are (if any), and we have not seen Patrick's follow-up proposed patch. I did find one case that is accidentally doing (3), and posted a patch elsewhere in the thread to convert it to (1). If you prefer behavior (3), you might consider that a regression, but it seems meaningless given the 99% of other cases that are using (1). If you want (3) to be the behavior everywhere, then we'd need to completely change our stance on how we invoke perl, or we need to teach PERL_PATH to handle this case so that people building Git can choose their own preference (sadly I don't think "make PERL_PATH='/usr/bin/env perl'" quite works because we have to shell-quote it in some contexts before evaluating). -Peff