[meta-oe,v2] iproute2: split ip to individual package

Submitted by Sinan Kaya on Dec. 16, 2020, 2:41 a.m. | Patch ID: 178940

Details

Message ID 20201216024141.22439-1-okaya@kernel.org
State Superseded
Headers show

Commit Message

Sinan Kaya Dec. 16, 2020, 2:41 a.m.
Move the ip tool into its own package. Useful for size constrained
systems that only want the ip tool.

Signed-off-by: Sinan Kaya <okaya@kernel.org>

---
 meta/recipes-connectivity/iproute2/iproute2.inc | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

-- 
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145760): https://lists.openembedded.org/g/openembedded-core/message/145760
Mute This Topic: https://lists.openembedded.org/mt/78992706/3616849
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [michael@yoctoproject.org]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc
index 403d264308c..f4d882d3ece 100644
--- a/meta/recipes-connectivity/iproute2/iproute2.inc
+++ b/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -46,10 +46,11 @@  do_install () {
 # The .so files in iproute2-tc are modules, not traditional libraries
 INSANE_SKIP_${PN}-tc = "dev-so"
 
-PACKAGES =+ "\
+IPROUTE2_PACKAGES =+ "\
     ${PN}-devlink \
     ${PN}-genl \
     ${PN}-ifstat \
+    ${PN}-ip \
     ${PN}-lnstat \
     ${PN}-nstat \
     ${PN}-rtacct \
@@ -58,12 +59,17 @@  PACKAGES =+ "\
     ${PN}-tipc \
 "
 
+PACKAGES += "${IPROUTE2_PACKAGES}"
+PROVIDES += "${IPROUTE2_PACKAGES}"
+RDEPENDS_${PN} += "${IPROUTE2_PACKAGES}"
+
 FILES_${PN}-tc = "${base_sbindir}/tc* \
                   ${libdir}/tc/*.so"
 FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
                       ${base_sbindir}/ctstat \
                       ${base_sbindir}/rtstat"
 FILES_${PN}-ifstat = "${base_sbindir}/ifstat"
+FILES_${PN}-ip = "${base_sbindir}/ip.${PN} ${sysconfdir}/iproute2"
 FILES_${PN}-genl = "${base_sbindir}/genl"
 FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
 FILES_${PN}-nstat = "${base_sbindir}/nstat"
@@ -71,7 +77,7 @@  FILES_${PN}-ss = "${base_sbindir}/ss"
 FILES_${PN}-tipc = "${base_sbindir}/tipc"
 FILES_${PN}-devlink = "${base_sbindir}/devlink"
 
-ALTERNATIVE_${PN} = "ip"
+ALTERNATIVE_${PN}-ip = "ip"
 ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
 ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip"
 ALTERNATIVE_PRIORITY = "100"

Comments

Richard Purdie Dec. 16, 2020, 11:50 a.m.
On Wed, 2020-12-16 at 02:41 +0000, Sinan Kaya wrote:
> Move the ip tool into its own package. Useful for size constrained

> systems that only want the ip tool.

> 

> Signed-off-by: Sinan Kaya <okaya@kernel.org>

> ---

>  meta/recipes-connectivity/iproute2/iproute2.inc | 10 ++++++++--

>  1 file changed, 8 insertions(+), 2 deletions(-)

> 

> diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc

> b/meta/recipes-connectivity/iproute2/iproute2.inc

> index 403d264308c..f4d882d3ece 100644

> --- a/meta/recipes-connectivity/iproute2/iproute2.inc

> +++ b/meta/recipes-connectivity/iproute2/iproute2.inc

> @@ -46,10 +46,11 @@ do_install () {

>  # The .so files in iproute2-tc are modules, not traditional

> libraries

>  INSANE_SKIP_${PN}-tc = "dev-so"

>  

> -PACKAGES =+ "\

> +IPROUTE2_PACKAGES =+ "\

>      ${PN}-devlink \

>      ${PN}-genl \

>      ${PN}-ifstat \

> +    ${PN}-ip \

>      ${PN}-lnstat \

>      ${PN}-nstat \

>      ${PN}-rtacct \

> @@ -58,12 +59,17 @@ PACKAGES =+ "\

>      ${PN}-tipc \

>  "

>

> +PACKAGES += "${IPROUTE2_PACKAGES}"

> +PROVIDES += "${IPROUTE2_PACKAGES}"


This doesn't look correct. Why do we need to add all the individual
package splits to PROVIDES?

I'm going to guess this is because you want to do:

DEPENDS = "iproute2-ip"

somewhere? If so, that is not how DEPENDS is meant to work, even after
this split you'd use:

DEPENDS = "iproute2"

If you want iproute2-ip specifically, you'd use the package namespace,
e.g. 

RDEPENDS = "iproute2-ip".

or is there some other reason for this? This is basically the issue
with some of the other package splits too, its not using the build time
verses runtime namespaces correctly.

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145764): https://lists.openembedded.org/g/openembedded-core/message/145764
Mute This Topic: https://lists.openembedded.org/mt/78992706/1003190
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-
Sinan Kaya Dec. 16, 2020, 4:09 p.m.
On 12/16/2020 6:50 AM, Richard Purdie wrote:
>> +++ b/meta/recipes-connectivity/iproute2/iproute2.inc

>> @@ -46,10 +46,11 @@ do_install () {

>>  # The .so files in iproute2-tc are modules, not traditional

>> libraries

>>  INSANE_SKIP_${PN}-tc = "dev-so"

>>  

>> -PACKAGES =+ "\

>> +IPROUTE2_PACKAGES =+ "\

>>      ${PN}-devlink \

>>      ${PN}-genl \

>>      ${PN}-ifstat \

>> +    ${PN}-ip \

>>      ${PN}-lnstat \

>>      ${PN}-nstat \

>>      ${PN}-rtacct \

>> @@ -58,12 +59,17 @@ PACKAGES =+ "\

>>      ${PN}-tipc \

>>  "

>>

>> +PACKAGES += "${IPROUTE2_PACKAGES}"

>> +PROVIDES += "${IPROUTE2_PACKAGES}"

> This doesn't look correct. Why do we need to add all the individual

> package splits to PROVIDES?

> 


I want to add iproute2-ip into my IMAGE_INSTALL and not take the rest
of the iproute2-$foo packages. If I don't add PROVIDES, build stage
fails saying nobody provides iproute2-ip.

> 

> or is there some other reason for this? This is basically the issue

> with some of the other package splits too, its not using the build time

> verses runtime namespaces correctly.


If I misunderstood something or am not doing it right, let me know.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145766): https://lists.openembedded.org/g/openembedded-core/message/145766
Mute This Topic: https://lists.openembedded.org/mt/78992706/1003190
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-
Sinan Kaya Dec. 16, 2020, 4:25 p.m.
On 12/16/2020 11:09 AM, Sinan Kaya wrote:
>>> +PACKAGES += "${IPROUTE2_PACKAGES}"

>>> +PROVIDES += "${IPROUTE2_PACKAGES}"

>> This doesn't look correct. Why do we need to add all the individual

>> package splits to PROVIDES?

>>

> I want to add iproute2-ip into my IMAGE_INSTALL and not take the rest

> of the iproute2-$foo packages. If I don't add PROVIDES, build stage

> fails saying nobody provides iproute2-ip.

> 


Interesting, it worked now. I queued some builds on my side. I will
post a new REV.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145767): https://lists.openembedded.org/g/openembedded-core/message/145767
Mute This Topic: https://lists.openembedded.org/mt/78992706/1003190
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-
Richard Purdie Dec. 16, 2020, 4:41 p.m.
On Wed, 2020-12-16 at 11:09 -0500, Sinan Kaya wrote:
> On 12/16/2020 6:50 AM, Richard Purdie wrote:

> > > +++ b/meta/recipes-connectivity/iproute2/iproute2.inc

> > > @@ -46,10 +46,11 @@ do_install () {

> > >  # The .so files in iproute2-tc are modules, not traditional

> > > libraries

> > >  INSANE_SKIP_${PN}-tc = "dev-so"

> > >  

> > > -PACKAGES =+ "\

> > > +IPROUTE2_PACKAGES =+ "\

> > >      ${PN}-devlink \

> > >      ${PN}-genl \

> > >      ${PN}-ifstat \

> > > +    ${PN}-ip \

> > >      ${PN}-lnstat \

> > >      ${PN}-nstat \

> > >      ${PN}-rtacct \

> > > @@ -58,12 +59,17 @@ PACKAGES =+ "\

> > >      ${PN}-tipc \

> > >  "

> > > 

> > > +PACKAGES += "${IPROUTE2_PACKAGES}"

> > > +PROVIDES += "${IPROUTE2_PACKAGES}"

> > This doesn't look correct. Why do we need to add all the individual

> > package splits to PROVIDES?

> > 

> 

> I want to add iproute2-ip into my IMAGE_INSTALL and not take the rest

> of the iproute2-$foo packages. If I don't add PROVIDES, build stage

> fails saying nobody provides iproute2-ip.


IMAGE_INSTALL is a runtime namespace, the same as RPROVIDES/RDEPENDS,
not PROVIDES/DEPENDS so using iproute2-ip there should be fine.

> > or is there some other reason for this? This is basically the issue

> > with some of the other package splits too, its not using the build

> > time verses runtime namespaces correctly.

> 

> If I misunderstood something or am not doing it right, let me know.


I think IMAGE_INSTALL should work (behind the scenes it adds to
RDEPENDS for the image).

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145768): https://lists.openembedded.org/g/openembedded-core/message/145768
Mute This Topic: https://lists.openembedded.org/mt/78992706/1003190
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-
Sinan Kaya Dec. 18, 2020, 4:57 a.m.
This is a system generated Comment: Patch 178940 was automatically marked as superseded by patch 178965.