From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-2.7 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 303502055E for ; Wed, 25 Oct 2017 23:10:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751813AbdJYXKi (ORCPT ); Wed, 25 Oct 2017 19:10:38 -0400 Received: from mout.gmx.net ([212.227.15.19]:64406 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751753AbdJYXKh (ORCPT ); Wed, 25 Oct 2017 19:10:37 -0400 Received: from virtualbox ([37.201.193.73]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lvkwm-1d71Cl1sbs-017VB6; Thu, 26 Oct 2017 01:10:07 +0200 Date: Thu, 26 Oct 2017 01:10:05 +0200 (CEST) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: Christian Couder cc: git@vger.kernel.org, Junio C Hamano , Jeff King , Ben Peart , Jonathan Tan , Nguyen Thai Ngoc Duy , Mike Hommey , Lars Schneider , Eric Wong , Christian Couder Subject: Re: [PATCH 0/6] Create Git/Packet.pm In-Reply-To: <20171019123030.17338-1-chriscool@tuxfamily.org> Message-ID: References: <20171019123030.17338-1-chriscool@tuxfamily.org> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V03:K0:U41usAnkYMIFQtArdvBpl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W802Ugqp19HIAdw78yT79YwlyqJqSHbKpwOeWEJm/plWIE5mV5w4bH1K5TULo23+U Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Christian, On Thu, 19 Oct 2017, Christian Couder wrote: > Add Git/Packet.pm from parts of t0021/rot13-filter.pl > > perl/Git/Packet.pm | 118 ++++++++++++++++++++++++++++++++++++++++++++++++ This change, together with forcing t0021/rot13-filter.pl to use Git/Packet.pm, breaks the test suite on Windows: https://travis-ci.org/git/git/jobs/292461846 There are actually two problems, one of which is fixed by -- snip -- diff --git a/perl/Makefile b/perl/Makefile index 15d96fcc7a5..f657de20e39 100644 --- a/perl/Makefile +++ b/perl/Makefile @@ -30,6 +30,7 @@ instdir_SQ = $(subst ','\'',$(prefix)/lib) modules += Git modules += Git/I18N modules += Git/IndexInfo +modules += Git/Packet modules += Git/SVN modules += Git/SVN/Memoize/YAML modules += Git/SVN/Fetcher -- snap -- You will want to pick this up in the next iteration. (You simply did not notice because you did not build with NO_PERL_MAKEMAKER.) However, that *still* does not fix the test for me: note how in the verbose output recorded in Travis (see the link above), Perl fails to find the Perl modules and then says: Can't locate Git/Packet.pm in @INC (you may need to install the Git::Packet module) (@INC contains: C \BuildAgent\_work\5\s\perl\blib\lib;C \BuildAgent\_work\5\s\perl\blib\arch\auto\Git /usr/lib/perl5/site_perl [..] Note that the correct blib path starts with `C:\BuildAgent\_work` and the line use lib (split(/:/, $ENV{GITPERLLIB})); splits off the drive letter from the rest of the path. Obviously, this fails to Do The Right Thing, and simply points to Yet Another Portability Problem with Git's reliance on Unix scripting. But why is it a Windows path in the first place? We take pains at using only Unix-style paths in Git's test suite after all. Well, this one is easy. We call git.exe, which is a pure Win32 executable (i.e. it *wants* Windows paths, even in the environment passed to it) and git.exe in turn calls Perl to interpret rot13-filter.pl. So on the way to git.exe, GITPERLLIB is converted by the MSYS2 runtime into a Windows-style path list. And then it is not converted back when we call Perl. As a workaround, I used a trick to exclude GITPERLLIB from being converted by MSYS2: setting the environment variable MSYS2_ENV_CONV_EXCL=GITPERLLIB "fixed" the test for me (with above patch thrown in). I also set the test in the Visual Studio Team Services build definition that runs those tests triggered by Travis. If your patch makes it into Git's `master`, we may have to hardcode that MSYS2_ENV_CONV_EXCL=GITPERLLIB (or augment any existing MSYS2_ENV_CONV_EXCL), so that other Windows developers do not have to stumble over the same thing and then spend 3 hours to debug it. Ciao, Dscho