Patchwork packaged-staging.bbclass: bug fix in ipk file name generation for searching ipk file.

login
register
mail settings
Submitter Noor Ahsan
Date Jan. 10, 2011, 4:13 a.m.
Message ID <1294632837-21666-1-git-send-email-noor_ahsan@mentor.com>
Download mbox | patch
Permalink /patch/208/
State Accepted
Headers show

Comments

Noor Ahsan - Jan. 10, 2011, 4:13 a.m.
* First check the availability of PKGV_pkg variable, if it is not available then get value from PKGV variable for creating ipk file name for searching ipk file.

Signed-off-by: Ahsan, Noor <noor_ahsan@mentor.com>
---
 classes/packaged-staging.bbclass |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
Khem Raj - Jan. 10, 2011, 4:42 p.m.
On 1/9/2011 8:13 PM, Ahsan, Noor wrote:
> * First check the availability of PKGV_pkg variable, if it is not available then get value from PKGV variable for creating ipk file name for searching ipk file.
>
> Signed-off-by: Ahsan, Noor<noor_ahsan@mentor.com>

Acked-by: Khem Raj <raj.khem@gmail.com>
> ---
>   classes/packaged-staging.bbclass |    5 ++++-
>   1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
> index d0aaea1..1200abc 100644
> --- a/classes/packaged-staging.bbclass
> +++ b/classes/packaged-staging.bbclass
> @@ -454,10 +454,13 @@ python do_package_stage () {
>               pr = bb.data.getVar('PR_%s' % pkg, d, 1)
>               if not pr:
>                   pr = bb.data.getVar('PR', d, 1)
> +            pkgv = bb.data.getVar('PKGV_%s' % pkg, d, 1)
> +            if not pkgv:
> +                pkgv = bb.data.getVar('PKGV', d, 1)
>               if not oe.packagedata.packaged(pkg, d):
>                   continue
>               if bb.data.inherits_class('package_ipk', d):
> -                srcname = bb.data.expand(pkgname + "_${PKGV}-" + pr + "${DISTRO_PR}" + "_" + arch + ".ipk", d)
> +                srcname = bb.data.expand(pkgname + "_" + pkgv + "-" + pr + "${DISTRO_PR}" + "_" + arch + ".ipk", d)
>                   srcfile = bb.data.expand("${DEPLOY_DIR_IPK}/" + arch + "/" + srcname, d)
>                   if os.path.exists(srcfile):
>                       destpath = ipkpath + "/" + arch + "/"

Patch

diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index d0aaea1..1200abc 100644
--- a/classes/packaged-staging.bbclass
+++ b/classes/packaged-staging.bbclass
@@ -454,10 +454,13 @@  python do_package_stage () {
             pr = bb.data.getVar('PR_%s' % pkg, d, 1)
             if not pr:
                 pr = bb.data.getVar('PR', d, 1)
+            pkgv = bb.data.getVar('PKGV_%s' % pkg, d, 1)
+            if not pkgv:
+                pkgv = bb.data.getVar('PKGV', d, 1)
             if not oe.packagedata.packaged(pkg, d):
                 continue
             if bb.data.inherits_class('package_ipk', d):
-                srcname = bb.data.expand(pkgname + "_${PKGV}-" + pr + "${DISTRO_PR}" + "_" + arch + ".ipk", d)
+                srcname = bb.data.expand(pkgname + "_" + pkgv + "-" + pr + "${DISTRO_PR}" + "_" + arch + ".ipk", d)
                 srcfile = bb.data.expand("${DEPLOY_DIR_IPK}/" + arch + "/" + srcname, d)
                 if os.path.exists(srcfile):
                     destpath = ipkpath + "/" + arch + "/"