[poky] [PATCH 1/1] curl: fix native dependency

Qing He qing.he at intel.com
Sun Dec 12 21:52:02 PST 2010


On Thu, 2010-12-09 at 23:16 +0800, Richard Purdie wrote:
> On Wed, 2010-12-08 at 11:12 +0800, Qing He wrote:
> > Thank you for the fix, I've been looking the smart data section
> > recently, and the rationale becomes much clearer to me.
> > 
> > However, the following case still has some confusion:
> > 
> > FOO = "A"
> > FOO_append = "B"
> > FOO_virtclass-native = "C"
> > 
> > when in virtclass-native, the output is simply "C", instead of "CB"
> > as I expected
> 
> This is a tricky one. It would be interesting to see if this applies
> with other overrides such as MACHINE. The reason I say that is the way
> the virtclass-native override is added (see native.bbclass).

So you mean this is intended? The FOO_append is meant to be hidden by
the use of an override? I'd rather have expected something like this:

---
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index c8cd8f8..3e4c710 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -149,6 +149,11 @@ class DataSmart:
             for var in vars:
                 name = var[:-l]
                 try:
+                    for op in __setvar_keyword__:
+                        if op in self[name]:
+                            sval = self.getVarFlag(name, op, False)
+                            self.setVarFlag(var, op, sval)
+
                     self[name] = self[var]
                 except Exception:
                     bb.msg.note(1, bb.msg.domain.Data, "Untracked delVar")

---


> SRC_URI where the name contains an "_" but since we don't allow
> overrides to contain the character, I think we're safe.
> 
> I also think you can simplify the logic slightly to be:
> 
> +                            for override in o.split('_'):
> +                                if not override in overrides:
> +                                    keep.append((a ,o)) 
> +                                    continue
> 
> ?
> 

This `continue' falls into the scope of `for override in o.split'
instead of the former one, chances are the (a, o) can be appended
more than once if multiple overrides not present.

Thanks,
Qing



More information about the poky mailing list