Skip to contentSkip to conversation

is it "PROVIDES =" or "PROVIDES +=" for setting an alternate name?

DISCUSSION Robert P. J. Day 2 participants 3 messages Jul 12, 2014

lore
Share & tools
lore
#0 lore raw

i notice that the OE-core codebase likes to mix these two forms of
using PROVIDES. for instance, for a number of libraries to provide their basename, i see stuff like:

recipes-graphics/xorg-lib/libxmu_1.1.2.bb:PROVIDES = "xmu" recipes-graphics/xorg-lib/libice_1.0.8.bb:PROVIDES = "ice" recipes-graphics/xorg-lib/libxdamage_1.1.4.bb:PROVIDES = "xdamage" recipes-graphics/xorg-lib/libxfont_1.4.7.bb:PROVIDES = "xfont" recipes-graphics/xorg-lib/libxdmcp_1.1.1.bb:PROVIDES = "xdmcp"

on the other hand, there is the occasional example of the same thing
that uses "PROVIDES +=" instead:

recipes-support/libpcre/libpcre_8.35.bb:PROVIDES += "pcre"

is there a deliberate distinction made in the recipes between these two forms?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw
Quoted 10 lines · Robert P. J. Day

i notice that the OE-core codebase likes to mix these two forms of
using PROVIDES. for instance, for a number of libraries to provide their basename, i see stuff like:

recipes-graphics/xorg-lib/libxmu_1.1.2.bb:PROVIDES = "xmu" recipes-graphics/xorg-lib/libice_1.0.8.bb:PROVIDES = "ice" recipes-graphics/xorg-lib/libxdamage_1.1.4.bb:PROVIDES = "xdamage" recipes-graphics/xorg-lib/libxfont_1.4.7.bb:PROVIDES = "xfont" recipes-graphics/xorg-lib/libxdmcp_1.1.1.bb:PROVIDES = "xdmcp"

Quoted 8 lines

on the other hand, there is the occasional example of the same thing
that uses "PROVIDES +=" instead:

recipes-support/libpcre/libpcre_8.35.bb:PROVIDES += "pcre"

is there a deliberate distinction made in the recipes between these two forms?

I don't think there's ever a valid reason to not use +=, unless it explicitly wants to remove something. That said, bitbake hardcodes addition of ${PN} to the PROVIDES list regardless of what the recipe says, so I expect from a practical perspective there isn't a difference. That said, I do think they should be switched to += to more accurately reflect the intent, and to improve future compatibility (e.g. if the default PROVIDES in bitbake.conf were to change).

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#2 lore raw
Quoted 22 lines · Christopher Larson
Quoted 10 lines · Robert P. J. Day

i notice that the OE-core codebase likes to mix these two forms of
using PROVIDES. for instance, for a number of libraries to provide their basename, i see stuff like:

recipes-graphics/xorg-lib/libxmu_1.1.2.bb:PROVIDES = "xmu" recipes-graphics/xorg-lib/libice_1.0.8.bb:PROVIDES = "ice" recipes-graphics/xorg-lib/libxdamage_1.1.4.bb:PROVIDES = "xdamage" recipes-graphics/xorg-lib/libxfont_1.4.7.bb:PROVIDES = "xfont" recipes-graphics/xorg-lib/libxdmcp_1.1.1.bb:PROVIDES = "xdmcp"

Quoted 8 lines

on the other hand, there is the occasional example of the same thing
that uses "PROVIDES +=" instead:

recipes-support/libpcre/libpcre_8.35.bb:PROVIDES += "pcre"

is there a deliberate distinction made in the recipes between these two forms?

Quoted 8 lines

I don't think there's ever a valid reason to not use +=, unless it explicitly wants to remove something. That said, bitbake hardcodes addition of ${PN} to the PROVIDES list regardless of what the recipe says, so I expect from a practical perspective there isn't a difference. That said, I do think they should be switched to += to more accurately reflect the intent, and to improve future compatibility (e.g. if the default PROVIDES in bitbake.conf were to change).

ok, i'm good with that, thanks.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================