Patchwork [bitbake-devel,21/32] cooker.py: Fix a bug due to variable name

login
register
mail settings
Submitter Shane Wang
Date Feb. 29, 2012, 2:15 p.m.
Message ID <83dbb646ca0fd8e565633e06c477e19c498c7f8d.1330523904.git.shane.wang@intel.com>
Download mbox | patch
Permalink /patch/22463/
State New
Headers show

Comments

Shane Wang - Feb. 29, 2012, 2:15 p.m.
From: Dongxiao Xu <dongxiao.xu@intel.com>

fnid is an outer variable and shouldn't be overrided, change the inner variable
name from 'fnid' to 'id'.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 bitbake/lib/bb/cooker.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Joshua Lock - Feb. 29, 2012, 9:28 p.m.
On 29/02/12 06:15, Shane Wang wrote:
> From: Dongxiao Xu<dongxiao.xu@intel.com>
>
> fnid is an outer variable and shouldn't be overrided, change the inner variable
> name from 'fnid' to 'id'.
>
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>

> ---
>   bitbake/lib/bb/cooker.py |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index 2e4a1ba..b23b569 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -501,8 +501,8 @@ class BBCooker:
>                       pn_provider = ""
>                       targetid = taskdata.getbuild_id(item)
>                       if targetid in taskdata.build_targets and taskdata.build_targets[targetid]:
> -                        fnid = taskdata.build_targets[targetid][0]
> -                        fn_provider = taskdata.fn_index[fnid]
> +                        id = taskdata.build_targets[targetid][0]
> +                        fn_provider = taskdata.fn_index[id]
>                           pn_provider = self.status.pkg_fn[fn_provider]
>                       else:
>                           pn_provider = item

Patch

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 2e4a1ba..b23b569 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -501,8 +501,8 @@  class BBCooker:
                     pn_provider = ""
                     targetid = taskdata.getbuild_id(item)
                     if targetid in taskdata.build_targets and taskdata.build_targets[targetid]:
-                        fnid = taskdata.build_targets[targetid][0]
-                        fn_provider = taskdata.fn_index[fnid]
+                        id = taskdata.build_targets[targetid][0]
+                        fn_provider = taskdata.fn_index[id]
                         pn_provider = self.status.pkg_fn[fn_provider]
                     else:
                         pn_provider = item