All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH v2] iproute2: split ip to individual package
@ 2020-12-16  2:41 Sinan Kaya
  2020-12-16 11:50 ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: Sinan Kaya @ 2020-12-16  2:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Sinan Kaya

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}"
+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"
-- 
2.17.1


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

* Re: [OE-core] [meta-oe][PATCH v2] iproute2: split ip to individual package
  2020-12-16  2:41 [meta-oe][PATCH v2] iproute2: split ip to individual package Sinan Kaya
@ 2020-12-16 11:50 ` Richard Purdie
  2020-12-16 16:09   ` Sinan Kaya
       [not found]   ` <16513E431D142AE6.31352@lists.openembedded.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Purdie @ 2020-12-16 11:50 UTC (permalink / raw)
  To: Sinan Kaya, openembedded-core

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


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

* Re: [OE-core] [meta-oe][PATCH v2] iproute2: split ip to individual package
  2020-12-16 11:50 ` [OE-core] " Richard Purdie
@ 2020-12-16 16:09   ` Sinan Kaya
  2020-12-16 16:41     ` Richard Purdie
       [not found]   ` <16513E431D142AE6.31352@lists.openembedded.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Sinan Kaya @ 2020-12-16 16:09 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

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.

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

* Re: [OE-core] [meta-oe][PATCH v2] iproute2: split ip to individual package
       [not found]   ` <16513E431D142AE6.31352@lists.openembedded.org>
@ 2020-12-16 16:25     ` Sinan Kaya
  0 siblings, 0 replies; 5+ messages in thread
From: Sinan Kaya @ 2020-12-16 16:25 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

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.

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

* Re: [OE-core] [meta-oe][PATCH v2] iproute2: split ip to individual package
  2020-12-16 16:09   ` Sinan Kaya
@ 2020-12-16 16:41     ` Richard Purdie
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2020-12-16 16:41 UTC (permalink / raw)
  To: Sinan Kaya, openembedded-core

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



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

end of thread, other threads:[~2020-12-16 16:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16  2:41 [meta-oe][PATCH v2] iproute2: split ip to individual package Sinan Kaya
2020-12-16 11:50 ` [OE-core] " Richard Purdie
2020-12-16 16:09   ` Sinan Kaya
2020-12-16 16:41     ` Richard Purdie
     [not found]   ` <16513E431D142AE6.31352@lists.openembedded.org>
2020-12-16 16:25     ` Sinan Kaya

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.