Skip to contentSkip to conversation

Question about RDEPENDS and RRECOMMENDS

DISCUSSION Carlos Rafael Giani 3 participants 7 messages Feb 14, 2015 – Feb 16, 2015

lore
Share & tools
lore
#0 lore raw

Hello,

I am updating the gstreamer1.0-plugins-imx recipe from meta-fsl-arm, and want to improve one aspect of it.
This recipe produces several packages. Among them are an audio and a video decoder plugin for GStreamer. In order to use the audio decoder at runtime, the "audioparsers" package from the gstreamer1.0-plugins-good recipe is required. Likewise, the video decoder needs video parsers from the gstreamer1.0-plugins-bad-videoparsersbad package. It is possible to install gstreamer1.0-plugins-imx packages without these other packages. However, GStreamer will then be unable to automatically use these decoders.

So, it would make sense to establish some sort of dependency. But how exactly? I thought of something like this:

RDEPENDS_gstreamer1.0-plugins-imx-imxaudio =
"gstreamer1.0-plugins-good-audioparsers"
RDEPENDS_gstreamer1.0-plugins-imx-imxvpu =
"gstreamer1.0-plugins-bad-videoparsersbad"

but then I also need to add gstreamer1.0-plugins-good and gstreamer1.0-plugins-bad to the DEPENDS list, otherwise I get a warning like:

QA Issue: gstreamer1.0-plugins-imx-imxaudio rdepends on
gstreamer1.0-plugins-good-audioparsers, but it isn't a build dependency? [build-deps]

But if I add these recipes to the DEPENDS variable, then the RDEPENDS spec is pointless, isn't it? Another option would be to use RRECOMMENDS instead of RDEPENDS, but I am not sure if this is such a good idea.

Any thoughts?

#1 lore raw

Hello Carlos,

On Sat, Feb 14, 2015 at 6:42 AM, Carlos Rafael Giani <[email protected]> wrote:
...

Quoted 12 lines

So, it would make sense to establish some sort of dependency. But how exactly? I thought of something like this:

RDEPENDS_gstreamer1.0-plugins-imx-imxaudio =
"gstreamer1.0-plugins-good-audioparsers"
RDEPENDS_gstreamer1.0-plugins-imx-imxvpu =
"gstreamer1.0-plugins-bad-videoparsersbad"

but then I also need to add gstreamer1.0-plugins-good and gstreamer1.0-plugins-bad to the DEPENDS list, otherwise I get a warning like:

Quoted 8 lines

QA Issue: gstreamer1.0-plugins-imx-imxaudio rdepends on
gstreamer1.0-plugins-good-audioparsers, but it isn't a build dependency? [build-deps]

But if I add these recipes to the DEPENDS variable, then the RDEPENDS spec is pointless, isn't it?
Another option would be to use RRECOMMENDS instead of RDEPENDS, but I am not sure if this is such a good idea.

The border line between RDEPENDS and RRECOMMENDS is very thin. The rule that I use is basically:

- if something requires A to run - RDEPENDS
- if something is usually used with A installed - RRECOMMENDS
- if something can make use of A in some cases - RSUGGESTS

As you said "It is possible to install gstreamer1.0-plugins-imx packages without these other packages." it seems to be that the right one is RRECOMMENDS so all users will have those installed by default while you keep the possibility of skipping (using BAD_RECOMMENDS) for advanced users.

Just for completeness, the QA issue about missing build-dependency is something we should pay attention to but it may be a false positive as in your cause you don't depends on them for building, just runtime. So you can whitelist the warning to avoid the noise but adding the depends would be wrong.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#2 lore raw
Quoted 25 lines · On Sunday 15 February 2015 19:34:28 Otavio Salvador wrote:

On Sat, Feb 14, 2015 at 6:42 AM, Carlos Rafael Giani <[email protected]> wrote:
...

Quoted 14 lines

So, it would make sense to establish some sort of dependency. But how

exactly? I thought of something like this:
RDEPENDS_gstreamer1.0-plugins-imx-imxaudio =

"gstreamer1.0-plugins-good-audioparsers"

RDEPENDS_gstreamer1.0-plugins-imx-imxvpu =

"gstreamer1.0-plugins-bad-videoparsersbad"

but then I also need to add gstreamer1.0-plugins-good and gstreamer1.0-plugins-bad to the DEPENDS list, otherwise I get a warning

Quoted 8 lines

like:
QA Issue: gstreamer1.0-plugins-imx-imxaudio rdepends on

gstreamer1.0-plugins-good-audioparsers, but it isn't a build dependency? [build-deps]

But if I add these recipes to the DEPENDS variable, then the RDEPENDS spec is pointless, isn't it?

Quoted 7 lines

...

Just for completeness, the QA issue about missing build-dependency is something we should pay attention to but it may be a false positive as in your cause you don't depends on them for building, just runtime. So you can whitelist the warning to avoid the noise but adding the depends would be wrong.

The QA warning message could perhaps be worded more accurately - what it means is there in an implicit runtime dependency and there is no RDEPENDS (not DEPENDS) explicitly telling the system to ensure that that dependency is satisfied. Whitelisting is never the proper way to fix this warning - either add an explicit RDEPENDS, or use configuration to ensure that the implicit dependency isn't needed.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#3 lore raw
Quoted 34 lines · Paul Eggleton
Quoted 25 lines · On Sunday 15 February 2015 19:34:28 Otavio Salvador wrote:

On Sat, Feb 14, 2015 at 6:42 AM, Carlos Rafael Giani <[email protected]> wrote:
...

Quoted 14 lines

So, it would make sense to establish some sort of dependency. But how

exactly? I thought of something like this:
RDEPENDS_gstreamer1.0-plugins-imx-imxaudio =

"gstreamer1.0-plugins-good-audioparsers"

RDEPENDS_gstreamer1.0-plugins-imx-imxvpu =

"gstreamer1.0-plugins-bad-videoparsersbad"

but then I also need to add gstreamer1.0-plugins-good and gstreamer1.0-plugins-bad to the DEPENDS list, otherwise I get a warning

Quoted 8 lines

like:
QA Issue: gstreamer1.0-plugins-imx-imxaudio rdepends on

gstreamer1.0-plugins-good-audioparsers, but it isn't a build dependency? [build-deps]

But if I add these recipes to the DEPENDS variable, then the RDEPENDS spec is pointless, isn't it?

Quoted 7 lines

...

Just for completeness, the QA issue about missing build-dependency is something we should pay attention to but it may be a false positive as in your cause you don't depends on them for building, just runtime. So you can whitelist the warning to avoid the noise but adding the depends would be wrong.

Quoted 6 lines

The QA warning message could perhaps be worded more accurately - what it means is there in an implicit runtime dependency and there is no RDEPENDS (not DEPENDS) explicitly telling the system to ensure that that dependency is satisfied. Whitelisting is never the proper way to fix this warning - either add an explicit RDEPENDS, or use configuration to ensure that the implicit dependency isn't needed.

From my understand, which Carlos can confirm, what he did was adding the package on the rdepends. Once this was done the QA warnings shows up which is wrong.

This can be seen at 'sed' recipe:

---
SUMMARY = "Stream EDitor (text filtering utility)"
...
RDEPENDS_${PN}-ptest += "make locale-base-ru-ru ${PN}"
---

In my system, with ptest enabled, I see:

WARNING: QA Issue: sed-ptest rdepends on locale-base-ru-ru, but it isn't a build dependency? [build-deps]

and this is clearly a false positive as this uses this locale at runtime for a test. Not necessarily it needs to have a DEPENDS on it which would imply it would need to be available in sysroot before sed configure could start.

What I think is missing is that the 'build-deps' check would need to whitelist the dependencies which come from a /explict/ package added in a RDEPENDS. What do you think?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#4 lore raw
Quoted 58 lines · Otavio Salvador
Quoted 33 lines · Paul Eggleton
Quoted 25 lines · On Sunday 15 February 2015 19:34:28 Otavio Salvador wrote:

On Sat, Feb 14, 2015 at 6:42 AM, Carlos Rafael Giani <[email protected]> wrote:
...

Quoted 14 lines

So, it would make sense to establish some sort of dependency. But how

exactly? I thought of something like this:
RDEPENDS_gstreamer1.0-plugins-imx-imxaudio =

"gstreamer1.0-plugins-good-audioparsers"

RDEPENDS_gstreamer1.0-plugins-imx-imxvpu =

"gstreamer1.0-plugins-bad-videoparsersbad"

but then I also need to add gstreamer1.0-plugins-good and gstreamer1.0-plugins-bad to the DEPENDS list, otherwise I get a warning

Quoted 8 lines

like:
QA Issue: gstreamer1.0-plugins-imx-imxaudio rdepends on

gstreamer1.0-plugins-good-audioparsers, but it isn't a build dependency? [build-deps]

But if I add these recipes to the DEPENDS variable, then the RDEPENDS spec is pointless, isn't it?

Quoted 7 lines

...

Just for completeness, the QA issue about missing build-dependency is something we should pay attention to but it may be a false positive as in your cause you don't depends on them for building, just runtime. So you can whitelist the warning to avoid the noise but adding the depends would be wrong.

Quoted 6 lines

The QA warning message could perhaps be worded more accurately - what it means is there in an implicit runtime dependency and there is no RDEPENDS (not DEPENDS) explicitly telling the system to ensure that that dependency is satisfied. Whitelisting is never the proper way to fix this warning - either add an explicit RDEPENDS, or use configuration to ensure that the implicit dependency isn't needed.

From my understand, which Carlos can confirm, what he did was adding
the package on the rdepends. Once this was done the QA warnings shows up which is wrong.

This can be seen at 'sed' recipe:

---
SUMMARY = "Stream EDitor (text filtering utility)"
...
RDEPENDS_${PN}-ptest += "make locale-base-ru-ru ${PN}"
---

In my system, with ptest enabled, I see:

WARNING: QA Issue: sed-ptest rdepends on locale-base-ru-ru, but it isn't a build dependency? [build-deps]

Quoted 9 lines

and this is clearly a false positive as this uses this locale at runtime for a test. Not necessarily it needs to have a DEPENDS on it which would imply it would need to be available in sysroot before sed configure could start.

What I think is missing is that the 'build-deps' check would need to whitelist the dependencies which come from a /explict/ package added in a RDEPENDS. What do you think?

Yes, exactly. The current QA warning greatly limits the usefulness of RDEPENDS, in my opinion. If I explicitely add a package name B to RDEPENDS in recipe A, and I add A to the IMAGE_INSTALL list, then I am stating that B must also be built and installed on the image, but it does *not* have to be built before A. Yet, the warnings makes it look as if B has to be built before A. This is confusing.

It makes a lot of sense to warn if for example a build script autodetects and links against a certain library which is not mentioned in the DEPENDS variable. But this is a different use case than the one mentioned above, and somehow it seems that both were lumped together.

#5 lore raw
Quoted 4 lines · Carlos Rafael Giani
Quoted 3 lines · Otavio Salvador

On Mon, Feb 16, 2015 at 9:12 AM, Paul Eggleton
<[email protected]> wrote:

...

Quoted 43 lines
Quoted 26 lines
Quoted 8 lines

The QA warning message could perhaps be worded more accurately - what it means
is there in an implicit runtime dependency and there is no RDEPENDS (not DEPENDS) explicitly telling the system to ensure that that dependency is satisfied. Whitelisting is never the proper way to fix this warning - either add
an explicit RDEPENDS, or use configuration to ensure that the implicit dependency isn't needed.

From my understand, which Carlos can confirm, what he did was adding
the package on the rdepends. Once this was done the QA warnings shows up which is wrong.

This can be seen at 'sed' recipe:

---
SUMMARY = "Stream EDitor (text filtering utility)"
...
RDEPENDS_${PN}-ptest += "make locale-base-ru-ru ${PN}"
---

In my system, with ptest enabled, I see:

WARNING: QA Issue: sed-ptest rdepends on locale-base-ru-ru, but it isn't a build dependency? [build-deps]

Quoted 9 lines

and this is clearly a false positive as this uses this locale at runtime for a test. Not necessarily it needs to have a DEPENDS on it which would imply it would need to be available in sysroot before sed configure could start.

What I think is missing is that the 'build-deps' check would need to whitelist the dependencies which come from a /explict/ package added in a RDEPENDS. What do you think?

Yes, exactly. The current QA warning greatly limits the usefulness of RDEPENDS, in my opinion. If I explicitely add a package name B to RDEPENDS in recipe A, and I add A to the IMAGE_INSTALL list, then I am stating that B must also be built and installed on the image, but it does *not* have to be built before A. Yet, the warnings makes it look as if B has to be built before A. This is confusing.

Quoted 4 lines

It makes a lot of sense to warn if for example a build script autodetects and links against a certain library which is not mentioned in the DEPENDS variable. But this is a different use case than the one mentioned above, and somehow it seems that both were lumped together.

What seems to be missing is the QA check to verify if B is explicitly cited in the recipe and in case it should be whitelisted.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#6 lore raw
In reply to Otavio Salvador
Quoted 65 lines · On Monday 16 February 2015 10:42:56 Otavio Salvador wrote:

On Mon, Feb 16, 2015 at 9:12 AM, Paul Eggleton

Quoted 38 lines · <[email protected]> wrote:
Quoted 29 lines · On Sunday 15 February 2015 19:34:28 Otavio Salvador wrote:

On Sat, Feb 14, 2015 at 6:42 AM, Carlos Rafael Giani <[email protected]> wrote:
...

Quoted 17 lines

So, it would make sense to establish some sort of dependency. But how

exactly? I thought of something like this:
RDEPENDS_gstreamer1.0-plugins-imx-imxaudio =

"gstreamer1.0-plugins-good-audioparsers"

RDEPENDS_gstreamer1.0-plugins-imx-imxvpu =

"gstreamer1.0-plugins-bad-videoparsersbad"

but then I also need to add gstreamer1.0-plugins-good and gstreamer1.0-plugins-bad to the DEPENDS list, otherwise I get a warning

like:
QA Issue: gstreamer1.0-plugins-imx-imxaudio rdepends on

Quoted 7 lines

gstreamer1.0-plugins-good-audioparsers, but it isn't a build dependency?
[build-deps]

But if I add these recipes to the DEPENDS variable, then the RDEPENDS spec
is pointless, isn't it?

Quoted 7 lines

...

Just for completeness, the QA issue about missing build-dependency is something we should pay attention to but it may be a false positive as in your cause you don't depends on them for building, just runtime. So you can whitelist the warning to avoid the noise but adding the depends would be wrong.

Quoted 6 lines

The QA warning message could perhaps be worded more accurately - what it means is there in an implicit runtime dependency and there is no RDEPENDS (not DEPENDS) explicitly telling the system to ensure that that dependency is satisfied. Whitelisting is never the proper way to fix this warning - either add an explicit RDEPENDS, or use configuration to ensure that the implicit dependency isn't needed.

From my understand, which Carlos can confirm, what he did was adding the package on the rdepends. Once this was done the QA warnings shows up which is wrong.

This can be seen at 'sed' recipe:

---
SUMMARY = "Stream EDitor (text filtering utility)"
...
RDEPENDS_${PN}-ptest += "make locale-base-ru-ru ${PN}"
---

In my system, with ptest enabled, I see:

WARNING: QA Issue: sed-ptest rdepends on locale-base-ru-ru, but it isn't a build dependency? [build-deps]

Quoted 8 lines

and this is clearly a false positive as this uses this locale at runtime for a test. Not necessarily it needs to have a DEPENDS on it which would imply it would need to be available in sysroot before sed configure could start.

What I think is missing is that the 'build-deps' check would need to whitelist the dependencies which come from a /explict/ package added in a RDEPENDS. What do you think?

If you look at the code in insane.bbclass, what it actually does is compare the task dependencies to what is in RDEPENDS; in theory what is not reflected in the task dependencies should only be those dependencies that were added dynamically at packaging time. You would have to investigate why an explicit RDEPENDS on locale-base-ru-ru doesn't get translated to a task dependency (or more likely, why this code thinks that it isn't). That is where any fix for this issue needs to be done.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre