Patchwork [1/2] kernel.bbclass: pass KERNEL_VERSION through legitimize_package_name

login
register
mail settings
Submitter Andreas Oberritter
Date April 15, 2011, 12:03 a.m.
Message ID <1302825782-17120-1-git-send-email-obi@opendreambox.org>
Download mbox | patch
Permalink /patch/2255/
State Accepted
Commit 063c182297c4e599581cbc8408964d6534aa18c6
Headers show

Comments

Andreas Oberritter - April 15, 2011, 12:03 a.m.
- KERNEL_VERSION may contain characters unsuitable for package
  names, e.g. underscores. Use legitimize_package_name to replace
  those characters.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 classes/kernel.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Andreas Oberritter - May 16, 2011, 11:40 a.m.
Ping

On 04/15/2011 02:03 AM, Andreas Oberritter wrote:
> - KERNEL_VERSION may contain characters unsuitable for package
>   names, e.g. underscores. Use legitimize_package_name to replace
>   those characters.
> 
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> ---
>  classes/kernel.bbclass |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
> index 0187fb3..bded15d 100644
> --- a/classes/kernel.bbclass
> +++ b/classes/kernel.bbclass
> @@ -245,8 +245,8 @@ RDEPENDS_kernel = "kernel-base"
>  # Allow machines to override this dependency if kernel image files are 
>  # not wanted in images as standard
>  RDEPENDS_kernel-base ?= "kernel-image"
> -PKG_kernel-image = "kernel-image-${KERNEL_VERSION}"
> -PKG_kernel-base = "kernel-${KERNEL_VERSION}"
> +PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
> +PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
>  ALLOW_EMPTY_kernel = "1"
>  ALLOW_EMPTY_kernel-base = "1"
>  ALLOW_EMPTY_kernel-image = "1"
Phil Blundell - May 16, 2011, 11:45 a.m.
I can't help thinking that, in this day and age, those PKG assignments
probably belong in some distro configuration rather than the recipe
itself, and it might be worth thinking about booting them out at some
point.  But, as long as they are there, your change is obviously
sensible.

Acked-by: Phil Blundell <philb@gnu.org>

p.

On Mon, 2011-05-16 at 13:40 +0200, Andreas Oberritter wrote:
> Ping
> 
> On 04/15/2011 02:03 AM, Andreas Oberritter wrote:
> > - KERNEL_VERSION may contain characters unsuitable for package
> >   names, e.g. underscores. Use legitimize_package_name to replace
> >   those characters.
> > 
> > Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> > ---
> >  classes/kernel.bbclass |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
> > index 0187fb3..bded15d 100644
> > --- a/classes/kernel.bbclass
> > +++ b/classes/kernel.bbclass
> > @@ -245,8 +245,8 @@ RDEPENDS_kernel = "kernel-base"
> >  # Allow machines to override this dependency if kernel image files are 
> >  # not wanted in images as standard
> >  RDEPENDS_kernel-base ?= "kernel-image"
> > -PKG_kernel-image = "kernel-image-${KERNEL_VERSION}"
> > -PKG_kernel-base = "kernel-${KERNEL_VERSION}"
> > +PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
> > +PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
> >  ALLOW_EMPTY_kernel = "1"
> >  ALLOW_EMPTY_kernel-base = "1"
> >  ALLOW_EMPTY_kernel-image = "1"
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Patch

diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index 0187fb3..bded15d 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -245,8 +245,8 @@  RDEPENDS_kernel = "kernel-base"
 # Allow machines to override this dependency if kernel image files are 
 # not wanted in images as standard
 RDEPENDS_kernel-base ?= "kernel-image"
-PKG_kernel-image = "kernel-image-${KERNEL_VERSION}"
-PKG_kernel-base = "kernel-${KERNEL_VERSION}"
+PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
+PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
 ALLOW_EMPTY_kernel = "1"
 ALLOW_EMPTY_kernel-base = "1"
 ALLOW_EMPTY_kernel-image = "1"