Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Nov 2017 23:49:59 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
Cc:        Bryan Drewery <bdrewery@freebsd.org>, Warner Losh <imp@freebsd.org>,  src-committers <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r325116 - head
Message-ID:  <CANCZdfoP6uVttpG-60eesgTfydm-5P1-brZnA9Ue%2BqOiEqCRZQ@mail.gmail.com>
In-Reply-To: <57DE6BAA-EAE4-49EB-BEEE-27286480B283@gmail.com>
References:  <201710300312.v9U3CcCT021416@repo.freebsd.org> <8d9e9f50-035c-403c-3bc5-6788b7a94dea@FreeBSD.org> <CANCZdfpXuLkS843%2BjneBzCYCsM5ZvV_Tm=zxzt73-wiD3C2%2BLg@mail.gmail.com> <72ee6c6d-0d9a-ebe9-8e15-c278fc91ded2@FreeBSD.org> <CANCZdfr6s0wWs%2BjYCVjAVEj0c_=5PGGz%2BnU-u8O61snNQjPKkQ@mail.gmail.com> <a5f57322-3dfe-0cd2-0366-0eea064327cb@FreeBSD.org> <3a0a92dd-19fc-2ee3-dcbf-224e4c2e8eec@FreeBSD.org> <F0072658-F037-456A-8AD0-8E8FE785ED35@gmail.com> <a2c9d616-2acd-0181-b33e-f6bcf7a58c00@FreeBSD.org> <57DE6BAA-EAE4-49EB-BEEE-27286480B283@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 4, 2017 at 11:30 PM, Ngie Cooper (yaneurabeya) <
yaneurabeya@gmail.com> wrote:

>
> > On Nov 4, 2017, at 08:31, Bryan Drewery <bdrewery@FreeBSD.org> wrote:
> >
> > On 11/4/2017 12:08 AM, Ngie Cooper (yaneurabeya) wrote:
> >>      I just ran into this with bash on universe12a.freebsd.org by
> doing ^d. I think the change should be reverted.
> >> Thanks,
> >> -Ngie
> >>
> >> $ exit
> >> *** Error code 130
> >>
> >> Stop.
> >> make[1]: stopped in /scratch/tmp/ngie/svn
> >> *** Error code 1
> >>
> >> Stop.
> >> make: stopped in /scratch/tmp/ngie/svn
> >>
> >
> > When you first go into buildenv check 'echo $?'.
> > My problem was a construct like '[ -f xxx ] && . xxx' at the end of one
> > of my profile scripts.  It needs to be 'if [ -f xxx ]; then . xxx; fi'
> > to avoid the bad status.  It's really unrelated to buildenv.
>
> The last line in my ~/.bashrc on my VM is export PATH that doesn=E2=80=99=
t fail
> with a syntax error, and the last line on my ~/.bashrc on universe12a is =
an
> alias set, which also doesn=E2=80=99t fail with a syntax error. Both case=
s set $? =3D
> 0.
>
> The issue I reported is caused by doing ^c + ^d (hence the error code 130
> in my original reply). I guess this is expected, but it=E2=80=99s going t=
o confuse
> people and force them to have to investigate the issue, unnecessarily, wh=
en
> it wasn=E2=80=99t an =E2=80=9Cissue=E2=80=9D before.
>

I can confirm this in my rather bare-bones bash environment.

I'm inclined to think that the edge case like this throwing slightly odd
results is a less bad outcome than not being able to get the results of a
make buildenv command... It's good to know that this oddity can happen.

We could:
(a) just put "|| true" back and stop. This breaks detecting if the make
buildenv command failed.
(b) We could just document this can happen, which is easy but still has the
issue
(c) We could create a new target to run commands, but that would be exactly
what buildenv is w/o the || true.

I'm inclined do (b). (a) is a non-starter. (c) is possible, but seems
wasteful to solve this case that can be explained in documentation.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoP6uVttpG-60eesgTfydm-5P1-brZnA9Ue%2BqOiEqCRZQ>