Date: Mon, 09 May 2016 12:43:42 -0700 From: John Baldwin <jhb@freebsd.org> To: freebsd-current@freebsd.org, "freebsd-pkgbase@freebsd.org" <freebsd-pkgbase@freebsd.org> Subject: Re: NO_INSTALLEXTRAKERNELS and PkgBase Message-ID: <6691787.Xk1Kup9mab@ralph.baldwin.cx> In-Reply-To: <20160509184544.GU1063@albert.catwhisker.org> References: <CAOc73CC6WoFHPDBa6LGMyhmnA1ZjiemffyTJBGBNSZwPOu8KzA@mail.gmail.com> <3382220.3AgOZzUBmF@ralph.baldwin.cx> <20160509184544.GU1063@albert.catwhisker.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, May 09, 2016 11:45:44 AM David Wolfskill wrote: > On Mon, May 09, 2016 at 11:05:55AM -0700, John Baldwin wrote: > > On Saturday, May 07, 2016 06:50:05 AM David Wolfskill wrote: > > > [Recipient list trimmed a bit -- dhw] > > ... > > > > 2 kernels get installed? Even if the old behaviour was to only install 1 > > > > kernel, if you are listing 2 kernels in KERNCONF presumably that is because > > > > you want to install 2 kernels? > > > > > > Errr... no: I don't. At least, not on the machine where I built them. > > > > Then don't pass them to 'installkernel'? That is, I think this makes sense > > if you want to build N kernels but only install 1: > > > > make buildkernel KERNCONF="FOO BAR BAZ" > > > > # only install the FOO kernel > > > > make installkernel KERNCONF="FOO" > > > > And then if you want to install multiple: > > > > # install both FOO and BAR kernels > > > > make installkernel KERNCONF="FOO BAR" > > I suppose there's probably some way to arrange things so the KERNCONF > specification in /etc/src.conf has one value during "buildkernel" and a > different value during "inistallkernel" -- but ... seriously...??!? One could do some ugly things with .make() to change the default based on the target being invoked (kind of like folks storing port options in /etc/make.conf conditional on the current directory), but that would be hackish. > Wouldn't it be cleaner to have different variables (e.g., that could > each default to the KERNCONF specification, but could be overridden in > a simple text file that doesn't require delving into make(1) arcana to > craft or understand)? I think having separate variables is fine, and I think your suggestion of KERNCONF_BUILD and KERNCONF_INSTALL that default to KERNCONF would be fine. From the thread, I think it would mean you would need to use the two settings in your /etc/src.conf but that other folks wanting to install both would just stick with KERNCONF, correct? > Multiple installkernel invocations is certainly not something I would > advocate -- I do silly things sometimes, but I hope nothing I wrote was > interpreted thus. :-} FWIW, my wrapper script I use arould buildworld, etc. actually invokes installkernel multiple times (but it also uses buildkernel multiple times as well. I think my script predates multiple kernel support in KERNCONF). > Suppose that src/Makefile.inc1 were modified so that: > * KERNCONF_BUILD is set to the value (explicit or otherwise) of KERNCONF > unless it already has a value (in which case, the explicit value is > used). > * KERNCONF_INSTALL is set to the value (explicit or otherwise) of KERNCONF > unless it already has a value (in which case, the explicit value is > used). > > buildkernel then builds the kernel configs listed in KERNCONF_BUILD; > installkernel then installs the kernels listed in KERNCONF_INSTALL. > > Folks who want to build & install the same set of kernels see no change. > > Folks who want a difference between "buildkernel" and "installkernel" have > a simple way to specify it. > > Only 1 invocation of installkernel is needed in any case. > > Would that work? It seems as if that would work for my case. Yes. I think that is also simpler than having a new WITH/WITHOUT variable to control how installkernel treats KERNCONF. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6691787.Xk1Kup9mab>