Patchwork nss: avoid to use the hardcode kernel version

login
register
mail settings
Submitter rongqing.li@windriver.com
Date Feb. 13, 2014, 3:48 a.m.
Message ID <1392263338-9144-1-git-send-email-rongqing.li@windriver.com>
Download mbox | patch
Permalink /patch/66675/
State New
Headers show

Comments

rongqing.li@windriver.com - Feb. 13, 2014, 3:48 a.m.
From: Roy Li <rongqing.li@windriver.com>

Read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion, to avoid
to use the hardcode kernel version.

Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
 meta/recipes-support/nss/nss.inc |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
David Nyström - Feb. 13, 2014, 11:45 a.m.
On 2014-02-13 04:48, rongqing.li@windriver.com wrote:
> From: Roy Li <rongqing.li@windriver.com>
>
> Read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion, to avoid
> to use the hardcode kernel version.
>
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
>   meta/recipes-support/nss/nss.inc |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
> index a6aeed8..3ad12cc 100644
> --- a/meta/recipes-support/nss/nss.inc
> +++ b/meta/recipes-support/nss/nss.inc
> @@ -23,7 +23,7 @@ SRC_URI_append_class-target = "\
>   "
>   inherit siteinfo
>   PR = "r0"
> -DEPENDS = "sqlite3 nspr zlib nss-native"
> +DEPENDS = "sqlite3 nspr zlib nss-native virtual/kernel"
>   DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
>   RDEPENDS_${PN} = "perl"
>
> @@ -55,7 +55,7 @@ do_compile() {
>       export NSS_USE_SYSTEM_SQLITE=1
>       export NSS_ENABLE_ECC=1
>
> -    export OS_RELEASE=3.4
> +    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'`

So if native or nativesdk versions compile before virtual/kernel 
${STAGING_KERNEL_DIR}/kernel-abiversion is available  ?

What will happen then ?

>       export OS_TARGET=Linux
>       export OS_ARCH=Linux
>
> @@ -95,7 +95,7 @@ do_install() {
>       export NSS_USE_SYSTEM_SQLITE=1
>       export NSS_ENABLE_ECC=1
>
> -    export OS_RELEASE=3.4
> +    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'`
>       export OS_TARGET=Linux
>       export OS_ARCH=Linux
>
>
Richard Purdie - Feb. 13, 2014, 12:04 p.m.
On Thu, 2014-02-13 at 11:48 +0800, rongqing.li@windriver.com wrote:
> From: Roy Li <rongqing.li@windriver.com>
> 
> Read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion, to avoid
> to use the hardcode kernel version.
> 
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
>  meta/recipes-support/nss/nss.inc |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

I've just realised this makes nss machine specific. We do not want to do
that.

Cheers,

Richard

Patch

diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
index a6aeed8..3ad12cc 100644
--- a/meta/recipes-support/nss/nss.inc
+++ b/meta/recipes-support/nss/nss.inc
@@ -23,7 +23,7 @@  SRC_URI_append_class-target = "\
 "
 inherit siteinfo
 PR = "r0"
-DEPENDS = "sqlite3 nspr zlib nss-native"
+DEPENDS = "sqlite3 nspr zlib nss-native virtual/kernel"
 DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
 RDEPENDS_${PN} = "perl"
 
@@ -55,7 +55,7 @@  do_compile() {
     export NSS_USE_SYSTEM_SQLITE=1
     export NSS_ENABLE_ECC=1
 
-    export OS_RELEASE=3.4
+    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'`
     export OS_TARGET=Linux
     export OS_ARCH=Linux
 
@@ -95,7 +95,7 @@  do_install() {
     export NSS_USE_SYSTEM_SQLITE=1
     export NSS_ENABLE_ECC=1
 
-    export OS_RELEASE=3.4
+    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'`
     export OS_TARGET=Linux
     export OS_ARCH=Linux