[OE-core] [PATCH 1/2] base: improve PACKAGECONFIG handling logic

Burton, Ross ross.burton at intel.com
Tue Sep 10 17:17:27 UTC 2013


On 10 September 2013 18:15, Ross Burton <ross.burton at intel.com> wrote:
> -                if num >= 3 and items[2]:
> -                    extradeps.append(items[2])
> -                if num >= 4 and items[3]:
> -                    extrardeps.append(items[3])
> -                if num >= 1 and items[0]:
> -                    extraconf.append(items[0])
> +                if items:
> +                    extraconf.append(items.pop(0))
> +                # Skip over disable
> +                if items:
> +                    items.pop(0)
> +                if items:
> +                    extradeps.append(items.pop(0))
> +                if items:
> +                    extrardeps.append(items.pop(0))

I should note that in a PACKAGECONFIG[foo] such as ",,,foo" this will
add some whitespace to EXTRA_OECONF and DEPENDS.  If this is a massive
concern I can sort it, but the clear code trumps the odd extra
whitespace in my mind.

Ross



More information about the Openembedded-core mailing list