[yocto] confusion about DEPENDS vs RDEPENDS

Nicolas Dechesne nicolas.dechesne at linaro.org
Wed Aug 28 14:22:12 PDT 2013


On Wed, Aug 28, 2013 at 9:22 PM, Hans Beckerus <hans.beckerus at gmail.com>wrote:

> Well, I have been struggling before with packages not properly supporting
> different build and source folders so I can definitely relate to what you
> are saying. But, does that mean I actually *have* to do it this way for
> build dependencies to work correctly? In my case we are talking two simple
> autotools enabled packages and I (naively?) assumed this was not something
> I had to take care of myself. What strikes me is that you say ""if recipe
> "foo" changes"", which is actually not the case here! What is changed is
> the actual source code only. Is that what is going wrong here? If I change
> my "foo" recipe version, would that be different than to simply
> fetch/unpack the "foo" package source code? Is "someapp" going to become
> purged differently in such a  scenario?
>

if the source code changes, the version of the recipe needs to change too.
if you change the source code without bumping the version, the package
might not be rebuilt properly indeed. and that can explain the behavior you
are seeing. if 'someapp' does not change, it would be rebuilt only if one
of its dependencies was rebuilt.


>
>
>  Have I been using the DEPENDS variable incorrectly? Would it make a
>>> difference if I used RDEPENDS instead?
>>>
>> RDEPENDS would not be appropriate in this situation, since we're talking
>> about
>> a build-time dependency.
>>
>> Hope that helps.
>>
> What is still somewhat unclear to me is the difference between DEPENDS and
> RDEPENDS in a simple case as this.
> A simple application needing a dynamic library is obviously a subject for
> DEPENDS but to me that also sounds like a typical RDEPENDS?
> However, when I build an image and include 'someapp', will 'libfoo.so.x'
> automatically be installed or is that what I need to tell it to do using
> RDEPENDS?
>
some (most?) of the RDEPENDS are computed auto-magically. so bitbake will
figure out the dependency between 'someapp' and 'libfoo.so.x' and will
automatically update 'someapp' RDEPENDS, without the need to do it
explicitely in the recipe!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20130828/a9b0a240/attachment.html>


More information about the yocto mailing list