From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by mail.openembedded.org (Postfix) with ESMTP id 8AD6777E9C for ; Mon, 26 Jun 2017 15:52:50 +0000 (UTC) Received: by mail-lf0-f66.google.com with SMTP id n136so491920lfn.2 for ; Mon, 26 Jun 2017 08:52:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/+1E1pH42WLnMif1cywh4pYODvn3plvD9+aiZC85xL0=; b=PHD9buasdudRf6arkqfniPmpy+NUjqfKN93Lc9PTywQwFedYAtLYdk0DJJlr4zXVen 44VFf+N+KhZupdxzrR4tmDCYymaOHZAAR7gXilnhfF1VWTjSHCa5VW1RWn9kgikPU/xh KLQEZlbmwtF3fR8LttXJRMHcI+x2oBQaYWR8y5NUQdgQoZQDu2Rqvdi2uptAzedwUwae qi59p2Q6r1mgw5IXEBNokTDH64ZEdRh+f6vCbswLD+MlJbHtLc6kpLXSSKtBW1vLoWlc VD3m/D0BtprVkYrm4gFjFsENrbgbm21MaCU+FFPt1ZTDlotW7CPxvbArTC/OY5D75rPI JGSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/+1E1pH42WLnMif1cywh4pYODvn3plvD9+aiZC85xL0=; b=H8tgJ8WRplv0USRkvOwAcu7oGUGcG4leptYHF4sJWPd26yREYiag7tm1ucBD8vtIZk yfWZCOhUK+cAPmPZInyO/XJU8p1goXYoShcq6QjjyJpj9tQ/B1e5KzUgFKAbbol+qZpo p0ELHlrNIj9eY0bzS74leSzp+UfloErZeKawRiBvwG9tXsF4ABBeBcAXI8/sBFN9FUjk VkU4HTyjNjGYRyMkokuwBWFZFpqThUEuEPLjBELPDCTxenamBghwuCpJXdhqsXidph+n FQn3toAWnFA/UvP9zRihkpxCvDmBnl1hPpS8z0iSX2d2iB88GyLrTF6lwVKTrMcthm08 J1DA== X-Gm-Message-State: AKS2vOz9aFzobBe/AfVnKC8o8BRd8uupa+i61VxgEN3VKohlaNAoR338 cXS6h0BDbEX/iuG1FxWdHst0b7jVDw== X-Received: by 10.25.27.2 with SMTP id b2mr256851lfb.24.1498492371043; Mon, 26 Jun 2017 08:52:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.9.137 with HTTP; Mon, 26 Jun 2017 08:52:50 -0700 (PDT) In-Reply-To: <20170621120003.6440-2-razvan.heghedus@ni.com> References: <20170621120003.6440-1-razvan.heghedus@ni.com> <20170621120003.6440-2-razvan.heghedus@ni.com> From: Bruce Ashfield Date: Mon, 26 Jun 2017 11:52:50 -0400 Message-ID: To: Heghedus Razvan Cc: Patches and discussions about the oe-core layer Subject: Re: [PATCH 2/2] kernel: user defined KERNEL_VERSION_PKG_NAME X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 15:52:50 -0000 Content-Type: multipart/alternative; boundary="001a1140244c798c540552def10e" --001a1140244c798c540552def10e Content-Type: text/plain; charset="UTF-8" On Wed, Jun 21, 2017 at 8:00 AM, Heghedus Razvan wrote: > Add possibility to set KERNEL_VERSION_PKG_NAME to a user > defined value. > > Signed-off-by: Heghedus Razvan > --- > meta/classes/kernel.bbclass | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass > index 605c101e62..02728d5a86 100644 > --- a/meta/classes/kernel.bbclass > +++ b/meta/classes/kernel.bbclass > @@ -28,12 +28,16 @@ INITRAMFS_IMAGE_BUNDLE ?= "" > # LINUX_VERSION which is a constant. > KERNEL_VERSION_NAME = "${@d.getVar('KERNEL_VERSION') or ""}" > KERNEL_VERSION_NAME[vardepvalue] = "${LINUX_VERSION}" > -KERNEL_VERSION_PKG_NAME = "${@legitimize_package_name(d. > getVar('KERNEL_VERSION'))}" > -KERNEL_VERSION_PKG_NAME[vardepvalue] = "${LINUX_VERSION}" > > python __anonymous () { > import re > > + if d.getVar('USER_KERNEL_VERSION_PKG') is None : > + d.setVar('KERNEL_VERSION_PKG_NAME', > "${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}") > + d.setVar('KERNEL_VERSION_PKG_NAME[vardepvalue]', > "${LINUX_VERSION}") > + else: > + d.setVar('KERNEL_VERSION_PKG_NAME', > "${@legitimize_package_name(d.getVar('USER_KERNEL_VERSION_PKG'))}") > This is introducing yet another variable that tweaks the already complex setting of the kernel version. Not to mention this code is already touchy with respect to parse time and rebuilding of the kernel. My concern is that if this is set, we are completely disassociated with the source code of the kernel. Where did you think this would be set ? local.conf ? distro config ? somewhere else ? If we had a way to simply override KERNEL_VERSION, we wouldn't need any extra variables. Bruce > + > # Merge KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE into > KERNEL_IMAGETYPES > type = d.getVar('KERNEL_IMAGETYPE') or "" > alttype = d.getVar('KERNEL_ALT_IMAGETYPE') or "" > -- > 2.13.1 > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core > -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" --001a1140244c798c540552def10e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Jun 21, 2017 at 8:00 AM, Heghedus Razvan <= razvan.heghedus= @ni.com> wrote:
Add possibi= lity to set KERNEL_VERSION_PKG_NAME to a user
defined value.

Signed-off-by: Heghedus Razvan <razvan.heghedus@ni.com>
---
=C2=A0meta/classes/kernel.bbclass | 8 ++++++--
=C2=A01 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 605c101e62..02728d5a86 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -28,12 +28,16 @@ INITRAMFS_IMAGE_BUNDLE ?=3D ""
=C2=A0# LINUX_VERSION which is a constant.
=C2=A0KERNEL_VERSION_NAME =3D "${@d.getVar('KERNEL_VERSION') o= r ""}"
=C2=A0KERNEL_VERSION_NAME[vardepvalue] =3D "${LINUX_VERSION}"= ;
-KERNEL_VERSION_PKG_NAME =3D "${@legitimize_package_name(d.getVar= ('KERNEL_VERSION'))}"
-KERNEL_VERSION_PKG_NAME[vardepvalue] =3D "${LINUX_VERSION}"=

=C2=A0python __anonymous () {
=C2=A0 =C2=A0 =C2=A0import re

+=C2=A0 =C2=A0 if d.getVar('USER_KERNEL_VERSION_PKG') is None = :
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 d.setVar('KERNEL_VERSION_PKG_NAME'= ;, "${@legitimize_package_name(d.getVar('KERNEL_VERSION')= )}")
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 d.setVar('KERNEL_VERSION_PKG_NAME[var= depvalue]', "${LINUX_VERSION}")
+=C2=A0 =C2=A0 else:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 d.setVar('KERNEL_VERSION_PKG_NAME'= ;, "${@legitimize_package_name(d.getVar('USER_KERNEL_VERSION_= PKG'))}")

This is introdu= cing yet another variable that tweaks the already complex setting of
<= div>the kernel version. Not to mention this code is already touchy with res= pect to
parse time and rebuilding of the kernel.

My concern is that if this is set, we are completely disassociated= with the source
code of the kernel.

Whe= re did you think this would be set ? local.conf ? distro config ? somewhere= else ?

If we had a way to simply override KERNEL_= VERSION, we wouldn't need any extra
variables.

=
Bruce
=C2=A0
+
=C2=A0 =C2=A0 =C2=A0# Merge KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE into = KERNEL_IMAGETYPES
=C2=A0 =C2=A0 =C2=A0type =3D d.getVar('KERNEL_IMAGETYPE') or "= "
=C2=A0 =C2=A0 =C2=A0alttype =3D d.getVar('KERNEL_ALT_IMAGETYPE'= ;) or ""
--
2.13.1

--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/m= ailman/listinfo/openembedded-core



--
"Thou shalt not follow the NULL pointer, for chaos and = madness await thee at its end"
--001a1140244c798c540552def10e--