Date: Sun, 14 Jan 2024 19:28:39 -0700 From: Warner Losh <imp@bsdimp.com> To: Warner Losh <imp@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3d939d967ad4 - main - build: Use ls -i | cut rather than stat -f %i to extract inode Message-ID: <CANCZdfpp97U=sU=mzM7JDwBOt2GEwZE5csMieMW0a9QbOmWu6g@mail.gmail.com> In-Reply-To: <202401150224.40F2OR6f093484@gitrepo.freebsd.org> References: <202401150224.40F2OR6f093484@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000033219b060ef2c66e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jan 14, 2024 at 7:24=E2=80=AFPM Warner Losh <imp@freebsd.org> wrote= : > The branch main has been updated by imp: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D3d939d967ad49f747b8b9db4fdec808= 6a7067582 > > commit 3d939d967ad49f747b8b9db4fdec8086a7067582 > Author: Warner Losh <imp@FreeBSD.org> > AuthorDate: 2023-05-02 20:51:09 +0000 > Commit: Warner Losh <imp@FreeBSD.org> > CommitDate: 2024-01-15 02:23:45 +0000 > > build: Use ls -i | cut rather than stat -f %i to extract inode > > ls -i dates back to 5th edition Unix and is more portable than the st= at > command, though %% is a newer shellism, it works on any shell that > FreeBSD builds with. > > Sponsored by: Netflix > Reviewed by: arichardson Differential Revision: https://reviews.freebsd.org/D43443 Warner --- > Makefile.inc1 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Makefile.inc1 b/Makefile.inc1 > index 34b49ee319ec..8a0073547ed0 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -1059,8 +1059,8 @@ _cleanworldtmp: .PHONY > .if ${USING_SYSTEM_COMPILER} =3D=3D "yes" > .for cc in cc c++ > if [ -x ${WORLDTMP}/usr/bin/${cc} ]; then \ > - inum=3D$$(stat -f %i ${WORLDTMP}/usr/bin/${cc}); \ > - find ${WORLDTMP}/usr/bin -inum $${inum} -delete; \ > + inum=3D$$(ls -i ${WORLDTMP}/usr/bin/${cc}); \ > + find ${WORLDTMP}/usr/bin -inum $${inum%% *} -delete; \ > fi > .endfor > .endif # ${USING_SYSTEM_COMPILER} =3D=3D "yes" > --00000000000033219b060ef2c66e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Sun, Jan 14, 2024 at 7:24=E2=80=AF= PM Warner Losh <<a href=3D"mailto:imp@freebsd.org">imp@freebsd.org</a>&g= t; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p= x 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The br= anch main has been updated by imp:<br> <br> URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D3d939d967ad49f747= b8b9db4fdec8086a7067582" rel=3D"noreferrer" target=3D"_blank">https://cgit.= FreeBSD.org/src/commit/?id=3D3d939d967ad49f747b8b9db4fdec8086a7067582</a><b= r> <br> commit 3d939d967ad49f747b8b9db4fdec8086a7067582<br> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> AuthorDate: 2023-05-02 20:51:09 +0000<br> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> CommitDate: 2024-01-15 02:23:45 +0000<br> <br> =C2=A0 =C2=A0 build: Use ls -i | cut rather than stat -f %i to extract inod= e<br> <br> =C2=A0 =C2=A0 ls -i dates back to 5th edition Unix and is more portable tha= n the stat<br> =C2=A0 =C2=A0 command, though %% is a newer shellism, it works on any shell= that<br> =C2=A0 =C2=A0 FreeBSD builds with.<br> <br> =C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Netflix= <br></blockquote><div><br></div><div>Reviewed by: arichardson</div><div>Dif= ferential Revision:=C2=A0<a href=3D"https://reviews.freebsd.org/D43443">htt= ps://reviews.freebsd.org/D43443</a></div><div><br></div><div>Warner<br></di= v><div><br> </div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px= 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> ---<br> =C2=A0Makefile.inc1 | 4 ++--<br> =C2=A01 file changed, 2 insertions(+), 2 deletions(-)<br> <br> diff --git a/Makefile.inc1 b/Makefile.inc1<br> index 34b49ee319ec..8a0073547ed0 100644<br> --- a/Makefile.inc1<br> +++ b/Makefile.inc1<br> @@ -1059,8 +1059,8 @@ _cleanworldtmp: .PHONY<br> =C2=A0.if ${USING_SYSTEM_COMPILER} =3D=3D "yes"<br> =C2=A0.for cc in cc c++<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ -x ${WORLDTMP}/usr/bin/${cc} ]; then \<br> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0inum=3D$$(stat -f %= i ${WORLDTMP}/usr/bin/${cc}); \<br> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0find ${WORLDTMP}/us= r/bin -inum $${inum} -delete; \<br> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0inum=3D$$(ls -i ${W= ORLDTMP}/usr/bin/${cc}); \<br> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0find ${WORLDTMP}/us= r/bin -inum $${inum%% *} -delete; \<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 fi<br> =C2=A0.endfor<br> =C2=A0.endif # ${USING_SYSTEM_COMPILER} =3D=3D "yes"<br> </blockquote></div></div> --00000000000033219b060ef2c66e--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpp97U=sU=mzM7JDwBOt2GEwZE5csMieMW0a9QbOmWu6g>