Date: Tue, 19 Jun 2018 09:38:48 -0700 From: Cy Schubert <Cy.Schubert@cschubert.com> To: Bryan Drewery <bdrewery@FreeBSD.org> Cc: "src-committers@freebsd.org" <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: r335244 - head Message-ID: <20180619163845.341EF8F4@spqr.komquats.com>
next in thread | raw e-mail | index | archive | help
I have a script that invokes buildworld/kernel, installworld/kernel, then p= roceeds to update jails if the jails are not in use. I passed the wrong arg= ument to my script. I hastily did control-r to find my last command and hit= enter without thinking (being rushed as usual). I assumed I used the corre= ct arguments. My assumption was incorrect. Sloppiness on my part. My script takes a snapshot of /usr/src and /usr/obj (whatever dataset they = reside in), svn up, buildworld/kernel, install*, mergemaster if requested, = then finally deletes the snapshots (depending on arguments). The return cod= e specifies whether poudeiere updates or not. I was rushing out the door that evening, so I figured I could squeeze in a = build by the time I got home. I specified to my script to build and install= only the kernel but the poudeiere invocation that followed wasn't aware th= at I had invoked the previous script to only build and install the kernel. = Not enough care for details that evening on my part. When I got home to dis= cover the install failure I had forgotten that I passed an argument to the = script to build/install only the kernel. Not a big deal, just need to be more careful next time. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Also, this old phone only supports top post. Apologies. Cy Schubert <Cy.Schubert@cschubert.com> or <cy@freebsd.org> The need of the many outweighs the greed of the few. --- -----Original Message----- From: Bryan Drewery Sent: 19/06/2018 08:57 To: Cy Schubert Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freeb= sd.org Subject: Re: svn commit: r335244 - head On 6/15/2018 10:02 PM, Cy Schubert wrote: > In message <201806160436.w5G4aXks039566@slippy.cwsent.com>, Cy Schubert=20 > writes: >> In message <201806160035.w5G0ZJfd066325@repo.freebsd.org>, Bryan=20 >> Drewery writes >> : >>> Author: bdrewery >>> Date: Sat Jun 16 00:35:19 2018 >>> New Revision: 335244 >>> URL: https://svnweb.freebsd.org/changeset/base/335244 >>> >>> Log: >>> Assert that a build is done before an install. >>> =20 >>> This should also catch cases where the wrong MAKEOBJDIRPREFIX is used= for >>> install. >>> =20 >>> MFC after: 2 weeks >>> Sponsored by: Dell EMC >>> >>> Modified: >>> head/Makefile.inc1 >>> >>> Modified: head/Makefile.inc1 >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D >> =3D=3D >>> =3D >>> --- head/Makefile.inc1 Fri Jun 15 23:42:22 2018 (r335243) >>> +++ head/Makefile.inc1 Sat Jun 16 00:35:19 2018 (r335244) >>> @@ -89,7 +89,10 @@ MK_GCC_BOOTSTRAP=3D no >>> .if make(installworld) || make(install) || make(distributeworld) || \ >>> make(stageworld) >>> .-include "${OBJTOP}/compiler-metadata.mk" >>> +.if !defined(_LOADED_COMPILER_METADATA) >>> +.error A build is required first. You may have the wrong MAKEOBJDIRPR= EFIX >> s >>> et. >>> .endif >>> +.endif >>> =20 >>> # Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. Pull it fr= om t >> he >>> # tree to be friendlier to foreign OS builds. It's safe to do so uncon= diti >> on >>> ally >>> @@ -195,6 +198,7 @@ compiler-metadata.mk: .PHONY .META >>> @: > ${.TARGET} >>> @echo ".info Using cached compiler metadata from build at $$(hostname= )=20 >>> on $$(date)" \ >>> > ${.TARGET} >>> + @echo "_LOADED_COMPILER_METADATA=3Dt" >> ${.TARGET} >>> .for v in ${_COMPILER_METADATA_VARS} >>> @echo "${v}=3D${${v}}" >> ${.TARGET} >>> .endfor >>> >> >> Another data point: This also broke the following: >> >> cwsys# poudriere jail -c -m src=3D/opt/src/svn-current -j HEADi386 -a i3= 86 >> [00:00:00] Creating HEADi386 fs at /poudriere/amd64/jails/HEADi386...=20 >> done >> [00:00:01] Copying /opt/src/svn-current to /poudriere/amd64/jails/HEADi3 >> 86/usr/src... done >> [00:06:01] Starting make installworld >> --- installworld --- >> make[1]: "/export/obj/opt/src/svn-current/i386.i386/compiler-metadata.mk >> " line 1: Using cached compiler metadata from build at cwsys on Fri Jun= =20 >> 15 18:39:46 PDT 2018 >> make[1]: "/opt/src/svn-current/Makefile.inc1" line 93: A build is=20 >> required first. You may have the wrong MAKEOBJDIRPREFIX set. >> *** [installworld] Error code 1 >> >> make: stopped in /opt/src/svn-current >> 1 error >> >> make: stopped in /opt/src/svn-current >> [00:06:01] Error: Failed to 'make installworld' >> [00:06:01] Error while creating jail, cleaning up. >> [00:06:01] Removing HEADi386 jail... done >> [00:06:03] Cleaning HEADi386 data... done >> cwsys#=20 >=20 > Nevermind. I found it. Stupid error on my part. >=20 >=20 I'm curious what you did? Did you svn update after a buildworld and then tried installworld? That would fail 1 time here but not again in the future. (Thinking outloud now, I could probably reuse the vcsversion code in newvers.sh to record the build revision during buildworld and check it matches at installworld time, but the assumes the same vcs tool is on the install machine so it probably wouldn't work.) I'm happy to see it may have caught a subtle mistake for you. --=20 Regards, Bryan Drewery
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180619163845.341EF8F4>