Patchwork [meta-oe] kernel.bbclass: pass KERNEL_VERSION through legitimize_package_name

login
register
mail settings
Submitter Khem Raj
Date May 20, 2011, 6:36 p.m.
Message ID <1305916565-15441-1-git-send-email-raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/4551/
State New, archived
Headers show

Comments

Khem Raj - May 20, 2011, 6:36 p.m.
From: Andreas Oberritter <obi@opendreambox.org>

- 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>
Acked-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/classes/kernel.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Koen Kooi - May 20, 2011, 7:29 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 20-05-11 20:36, raj.khem@gmail.com wrote:
> From: Andreas Oberritter <obi@opendreambox.org>
> 
> - 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>
> Acked-by: Phil Blundell <philb@gnu.org>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>

I cherry-picked it before I read this mail :)

> ---
>  meta-oe/classes/kernel.bbclass |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-oe/classes/kernel.bbclass b/meta-oe/classes/kernel.bbclass
> index e1e8197..7498c2c 100644
> --- a/meta-oe/classes/kernel.bbclass
> +++ b/meta-oe/classes/kernel.bbclass
> @@ -238,8 +238,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"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFN1sEUMkyGM64RGpERAjvUAJ9gAyp9fGBU7hcAew6Wdz5plpPQlQCeOaBj
1921JJIJCRaUxllK+OjYX1g=
=4BLe
-----END PGP SIGNATURE-----

Patch

diff --git a/meta-oe/classes/kernel.bbclass b/meta-oe/classes/kernel.bbclass
index e1e8197..7498c2c 100644
--- a/meta-oe/classes/kernel.bbclass
+++ b/meta-oe/classes/kernel.bbclass
@@ -238,8 +238,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"