All of lore.kernel.org
 help / color / mirror / Atom feed
* Correctly setting a package-specific RDEPENDS
@ 2013-06-05 14:53 Jon Szymaniak
  2013-06-05 16:27 ` Paul Eggleton
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Szymaniak @ 2013-06-05 14:53 UTC (permalink / raw)
  To: yocto@yoctoproject.org

Hi all,

I recently upgraded to the Dylan (9.0.0) release and am looking to
clean up some QA issues associated with my RDEPENDS variables not
being package-specific.

I'm a bit confused by a couple lines in the manual [1]:

"The names of the variables you list with RDEPENDS must be the names
of other packages as listed in the PACKAGES variable. You should not
list recipe names (PN)."

It makes sense to me that you'd want to set the run-time deps on a
per-package basis to avoid creating false-dependencies. However, I'm
unsure as to how can simply not write RDEPENDS_${PN} in some cases.
Furthermore, I feel like I'm not quite understanding what the
consequences of using RDEPENDS_${PN} are.

Here's an example of what I'm trying to do -- perhaps someone will
catch where I'm getting confused and offer some insight?

Let's say I have a program_a.bb and a program_b.bb. Both are simple
recipes that compile and install ${D}/usr/bin/program_a and
${D}/usr/bin/program_b.

Because program_a forks and execs program_b, but otherwise does not
depend upon it to compile, I thought I should place RDEPENDS_${PN} =
"program_b " in program_a.bb.  However, this seems to violate the
aforementioned snippet from the manual.


Thanks!


[1] http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-RDEPENDS


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Correctly setting a package-specific RDEPENDS
  2013-06-05 14:53 Correctly setting a package-specific RDEPENDS Jon Szymaniak
@ 2013-06-05 16:27 ` Paul Eggleton
  2013-06-05 16:31   ` Jon Szymaniak
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggleton @ 2013-06-05 16:27 UTC (permalink / raw)
  To: Jon Szymaniak; +Cc: yocto

On Wednesday 05 June 2013 10:53:23 Jon Szymaniak wrote:
> I recently upgraded to the Dylan (9.0.0) release and am looking to
> clean up some QA issues associated with my RDEPENDS variables not
> being package-specific.
> 
> I'm a bit confused by a couple lines in the manual [1]:
> 
> "The names of the variables you list with RDEPENDS must be the names
> of other packages as listed in the PACKAGES variable. You should not
> list recipe names (PN)."

I think the mention of PN here is confusing. It's trying to explain that you 
should use package names and not recipe names, but perhaps the wording needs 
to be improved.

> It makes sense to me that you'd want to set the run-time deps on a
> per-package basis to avoid creating false-dependencies. However, I'm
> unsure as to how can simply not write RDEPENDS_${PN} in some cases.
> Furthermore, I feel like I'm not quite understanding what the
> consequences of using RDEPENDS_${PN} are.
> 
> Here's an example of what I'm trying to do -- perhaps someone will
> catch where I'm getting confused and offer some insight?
> 
> Let's say I have a program_a.bb and a program_b.bb. Both are simple
> recipes that compile and install ${D}/usr/bin/program_a and
> ${D}/usr/bin/program_b.
> 
> Because program_a forks and execs program_b, but otherwise does not
> depend upon it to compile, I thought I should place RDEPENDS_${PN} =
> "program_b " in program_a.bb.  However, this seems to violate the
> aforementioned snippet from the manual.

That is the expected usage; I guess the manual has confused you. All the QA 
warning is saying is you should do this:

RDEPENDS_${PN} = "somepackage"

and _not_ this:

RDEPENDS = "somepackage"

(The reason being, the latter would add a runtime dependency on "somepackage" 
to every package in the recipe's PACKAGES, which is almost never the desired 
result.)

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Correctly setting a package-specific RDEPENDS
  2013-06-05 16:27 ` Paul Eggleton
@ 2013-06-05 16:31   ` Jon Szymaniak
  0 siblings, 0 replies; 3+ messages in thread
From: Jon Szymaniak @ 2013-06-05 16:31 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto@yoctoproject.org

> On Wednesday 05 June 2013 10:53:23 Jon Szymaniak wrote:
>> I recently upgraded to the Dylan (9.0.0) release and am looking to
>> clean up some QA issues associated with my RDEPENDS variables not
>> being package-specific.
>>
>> I'm a bit confused by a couple lines in the manual [1]:
>>
>> "The names of the variables you list with RDEPENDS must be the names
>> of other packages as listed in the PACKAGES variable. You should not
>> list recipe names (PN)."
>
> I think the mention of PN here is confusing. It's trying to explain that you
> should use package names and not recipe names, but perhaps the wording needs
> to be improved.
>
>> It makes sense to me that you'd want to set the run-time deps on a
>> per-package basis to avoid creating false-dependencies. However, I'm
>> unsure as to how can simply not write RDEPENDS_${PN} in some cases.
>> Furthermore, I feel like I'm not quite understanding what the
>> consequences of using RDEPENDS_${PN} are.
>>
>> Here's an example of what I'm trying to do -- perhaps someone will
>> catch where I'm getting confused and offer some insight?
>>
>> Let's say I have a program_a.bb and a program_b.bb. Both are simple
>> recipes that compile and install ${D}/usr/bin/program_a and
>> ${D}/usr/bin/program_b.
>>
>> Because program_a forks and execs program_b, but otherwise does not
>> depend upon it to compile, I thought I should place RDEPENDS_${PN} =
>> "program_b " in program_a.bb.  However, this seems to violate the
>> aforementioned snippet from the manual.
>
> That is the expected usage; I guess the manual has confused you. All the QA
> warning is saying is you should do this:
>
> RDEPENDS_${PN} = "somepackage"
>
> and _not_ this:
>
> RDEPENDS = "somepackage"
>
> (The reason being, the latter would add a runtime dependency on "somepackage"
> to every package in the recipe's PACKAGES, which is almost never the desired
> result.)
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre


Hi Paul,

That clarifies things greatly. Many thanks!

- Jon


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-05 16:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-05 14:53 Correctly setting a package-specific RDEPENDS Jon Szymaniak
2013-06-05 16:27 ` Paul Eggleton
2013-06-05 16:31   ` Jon Szymaniak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.