From owner-freebsd-current@freebsd.org Mon May 9 22:18:47 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41827B35BF1; Mon, 9 May 2016 22:18:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 155F017C7; Mon, 9 May 2016 22:18:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2810AB93E; Mon, 9 May 2016 18:18:46 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org, "freebsd-pkgbase@freebsd.org" Subject: Re: NO_INSTALLEXTRAKERNELS and PkgBase Date: Mon, 09 May 2016 12:43:42 -0700 Message-ID: <6691787.Xk1Kup9mab@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <20160509184544.GU1063@albert.catwhisker.org> References: <3382220.3AgOZzUBmF@ralph.baldwin.cx> <20160509184544.GU1063@albert.catwhisker.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 09 May 2016 18:18:46 -0400 (EDT) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 May 2016 22:18:47 -0000 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