[OE-core] [RFC 1/2] os-release: add new operating system identification recipe

Martin Jansa martin.jansa at gmail.com
Fri Dec 13 16:33:48 UTC 2013


On Fri, Dec 13, 2013 at 08:12:51AM -0700, Chris Larson wrote:
> On Fri, Dec 13, 2013 at 8:08 AM, Martin Jansa <martin.jansa at gmail.com>wrote:
> 
> > > +do_compile () {
> > > +    for field in ${OS_RELEASE_FIELDS}; do
> > > +        if eval "test -n \"\$$field\""; then
> > > +            eval "printf \"%s=%s\n\" \"\$field\" \"\$$field\""
> > > +        fi
> > > +    done >os-release
> > > +}
> > > +do_compile[vardeps] += "${OS_RELEASE_FIELDS}"
> >
> > Isn't this dependency picked automatically?
> >
> 
> No, this is expanded, so this adds the dependency on the variables whose
> names are in the OS_RELEASE_FIELDS variable, not just on OS_RELEASE_FIELDS
> itself. Due to the use of eval, bitbake doesn’t know we’re using the
> iterated values as variable names.

Ah I see, thanks for explanation.

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20131213/ca3fcad0/attachment-0002.sig>


More information about the Openembedded-core mailing list