{"thread":{"id":"42887","subject":"[PATCH] config.mak.uname: set PERL_PATH for FreeBSD 5.0+","startedAt":"2016-07-20T02:56:35Z","lastAt":"2016-07-21T15:18:16Z","messageCount":6,"participants":["Eric Wong","Johannes Schindelin","Junio C Hamano","brian m. carlson"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"291785","messageId":"20160720025630.GA71874@plume","threadId":"42887","inReplyTo":null,"subject":"[PATCH] config.mak.uname: set PERL_PATH for FreeBSD 5.0+","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2016-07-20T02:56:30Z","receivedAt":"2016-07-20T02:56:35Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Perl has not been part of the base system since FreeBSD 5.0:\n\n\thttps://www.freebsd.org/releases/5.0R/relnotes-i386.html\n\nSigned-off-by: Eric Wong <e@80x24.org>\n---\n  Does anybody still run git on FreeBSD 4.x or earlier?\n  4.11 was released a few months before git in 2005:\n\n\thttps://www.freebsd.org/releases/\n\n config.mak.uname | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex a88f139..6c29545 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -202,6 +202,11 @@ ifeq ($(uname_S),FreeBSD)\n \t\tNO_UINTMAX_T = YesPlease\n \t\tNO_STRTOUMAX = YesPlease\n \tendif\n+\tR_MAJOR := $(shell expr \"$(uname_R)\" : '\\([0-9]*\\)\\.')\n+\n+\tifeq ($(shell test \"$(R_MAJOR)\" -ge 5 && echo 1),1)\n+\t\tPERL_PATH = /usr/local/bin/perl\n+\tendif\n \tPYTHON_PATH = /usr/local/bin/python\n \tHAVE_PATHS_H = YesPlease\n \tGMTIME_UNRELIABLE_ERRORS = UnfortunatelyYes\n-- \nEW\n"},{"id":"291797","messageId":"alpine.DEB.2.20.1607201322350.14111@virtualbox","threadId":"42887","inReplyTo":"20160720025630.GA71874@plume","subject":"Re: [PATCH] config.mak.uname: set PERL_PATH for FreeBSD 5.0+","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-07-20T11:25:29Z","receivedAt":"2016-07-20T11:26:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Eric,\n\nOn Wed, 20 Jul 2016, Eric Wong wrote:\n\n> diff --git a/config.mak.uname b/config.mak.uname\n> index a88f139..6c29545 100644\n> --- a/config.mak.uname\n> +++ b/config.mak.uname\n> @@ -202,6 +202,11 @@ ifeq ($(uname_S),FreeBSD)\n>  \t\tNO_UINTMAX_T = YesPlease\n>  \t\tNO_STRTOUMAX = YesPlease\n>  \tendif\n> +\tR_MAJOR := $(shell expr \"$(uname_R)\" : '\\([0-9]*\\)\\.')\n> +\n> +\tifeq ($(shell test \"$(R_MAJOR)\" -ge 5 && echo 1),1)\n> +\t\tPERL_PATH = /usr/local/bin/perl\n> +\tendif\n\nIn keeping with other uname_R usage, should this not read\n\n\t# Since FreeBSD 5.0, Perl is part of the core\n\tifneq ($(shell expr \"$(uname_R)\" : '[1-4]\\.'),2)\n\t\tPERL_PATH = /usr/local/bin/perl\n\tendif\n\ninstead?\n\nCiao,\nDscho\n"},{"id":"291844","messageId":"20160720180702.GA13404@starla","threadId":"42887","inReplyTo":"alpine.DEB.2.20.1607201322350.14111@virtualbox","subject":"Re: [PATCH] config.mak.uname: set PERL_PATH for FreeBSD 5.0+","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2016-07-20T18:07:02Z","receivedAt":"2016-07-20T18:07:08Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> Hi Eric,\n> \n> On Wed, 20 Jul 2016, Eric Wong wrote:\n> \n> > diff --git a/config.mak.uname b/config.mak.uname\n> > index a88f139..6c29545 100644\n> > --- a/config.mak.uname\n> > +++ b/config.mak.uname\n> > @@ -202,6 +202,11 @@ ifeq ($(uname_S),FreeBSD)\n> >  \t\tNO_UINTMAX_T = YesPlease\n> >  \t\tNO_STRTOUMAX = YesPlease\n> >  \tendif\n> > +\tR_MAJOR := $(shell expr \"$(uname_R)\" : '\\([0-9]*\\)\\.')\n> > +\n> > +\tifeq ($(shell test \"$(R_MAJOR)\" -ge 5 && echo 1),1)\n> > +\t\tPERL_PATH = /usr/local/bin/perl\n> > +\tendif\n> \n> In keeping with other uname_R usage, should this not read\n> \n> \t# Since FreeBSD 5.0, Perl is part of the core\n> \tifneq ($(shell expr \"$(uname_R)\" : '[1-4]\\.'),2)\n> \t\tPERL_PATH = /usr/local/bin/perl\n> \tendif\n> \n> instead?\n\nThat's fine; however I don't use `expr` often, so it required\na little more time to realize the '2' means 2 characters were\nmatched.\n\nAlso, my use of a numeric comparison may be more future-proof\nin case FreeBSD decides to have /usr/bin/perl again.\n\nI also wonder why we don't use `which` to search for somewhat\nstandard path components, instead.  Something like:\n\n  PERL_PATH = $(shell PATH=/bin:/usr/bin:/usr/local/bin which perl)\n"},{"id":"291845","messageId":"CAPc5daXuZZuhaTW-hb6FOo6p+gzvrd-rx-FDvo4VzCOH+HpSJg@mail.gmail.com","threadId":"42887","inReplyTo":"20160720180702.GA13404@starla","subject":"Re: [PATCH] config.mak.uname: set PERL_PATH for FreeBSD 5.0+","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-07-20T18:10:40Z","receivedAt":"2016-07-20T18:11:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"On Wed, Jul 20, 2016 at 11:07 AM, Eric Wong <e@80x24.org> wrote:\n> Also, my use of a numeric comparison may be more future-proof\n> in case FreeBSD decides to have /usr/bin/perl again.\n>\n> I also wonder why we don't use `which` to search for somewhat\n> standard path components, instead.  Something like:\n\nBecause historically output from \"which\" was not meant to be\nmachine parseable (some implementation said 'perl is /usr/bin/perl')\n"},{"id":"291900","messageId":"20160721010206.GA215655@vauxhall.crustytoothpaste.net","threadId":"42887","inReplyTo":"CAPc5daXuZZuhaTW-hb6FOo6p+gzvrd-rx-FDvo4VzCOH+HpSJg@mail.gmail.com","subject":"Re: [PATCH] config.mak.uname: set PERL_PATH for FreeBSD 5.0+","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2016-07-21T01:02:07Z","receivedAt":"2016-07-21T01:02:19Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Wed, Jul 20, 2016 at 11:10:40AM -0700, Junio C Hamano wrote:\n> On Wed, Jul 20, 2016 at 11:07 AM, Eric Wong <e@80x24.org> wrote:\n> > Also, my use of a numeric comparison may be more future-proof\n> > in case FreeBSD decides to have /usr/bin/perl again.\n> >\n> > I also wonder why we don't use `which` to search for somewhat\n> > standard path components, instead.  Something like:\n> \n> Because historically output from \"which\" was not meant to be\n> machine parseable (some implementation said 'perl is /usr/bin/perl')\n\nThe POSIXy way to write which is \"command -v\", which may or may not be\nmore portable.  It does have the desired output, though.\n-- \nbrian m. carlson / brian with sandals: Houston, Texas, US\n+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"291920","messageId":"alpine.DEB.2.20.1607211716100.14111@virtualbox","threadId":"42887","inReplyTo":"20160720180702.GA13404@starla","subject":"Re: [PATCH] config.mak.uname: set PERL_PATH for FreeBSD 5.0+","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-07-21T15:17:18Z","receivedAt":"2016-07-21T15:18:16Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Eric,\n\nOn Wed, 20 Jul 2016, Eric Wong wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> > \n> > On Wed, 20 Jul 2016, Eric Wong wrote:\n> > \n> > > diff --git a/config.mak.uname b/config.mak.uname\n> > > index a88f139..6c29545 100644\n> > > --- a/config.mak.uname\n> > > +++ b/config.mak.uname\n> > > @@ -202,6 +202,11 @@ ifeq ($(uname_S),FreeBSD)\n> > >  \t\tNO_UINTMAX_T = YesPlease\n> > >  \t\tNO_STRTOUMAX = YesPlease\n> > >  \tendif\n> > > +\tR_MAJOR := $(shell expr \"$(uname_R)\" : '\\([0-9]*\\)\\.')\n> > > +\n> > > +\tifeq ($(shell test \"$(R_MAJOR)\" -ge 5 && echo 1),1)\n> > > +\t\tPERL_PATH = /usr/local/bin/perl\n> > > +\tendif\n> > \n> > In keeping with other uname_R usage, should this not read\n> > \n> > \t# Since FreeBSD 5.0, Perl is part of the core\n> > \tifneq ($(shell expr \"$(uname_R)\" : '[1-4]\\.'),2)\n> > \t\tPERL_PATH = /usr/local/bin/perl\n> > \tendif\n> > \n> > instead?\n> \n> That's fine; however I don't use `expr` often, so it required\n> a little more time to realize the '2' means 2 characters were\n> matched.\n\nI never use `expr`, so I had to go and see the surrounding code to\ndetermine what the code style is.\n\n> Also, my use of a numeric comparison may be more future-proof\n> in case FreeBSD decides to have /usr/bin/perl again.\n\nThat is a very theoretical concern ;-)\n\nCiao,\nDscho\n"}]}