mbox series

[RFC,0/2] Handling of ${PN}-dev RRECOMMENDS non-existent ${PN}

Message ID 20230223232939.3932270-1-yoann.congal@smile.fr
Headers show
Series Handling of ${PN}-dev RRECOMMENDS non-existent ${PN} | expand

Message

Yoann Congal Feb. 23, 2023, 11:29 p.m. UTC
This series is a work in progress on 2 related bugs :
* [YOCTO #6839] Handle dev package with no main package more gracefully
* [YOCTO #8222] Elide dependency from -dev package on main package if
  there are no shared libraries in it

An empty package ${PN} is not generated by default. This has been a
problem most frequently seen because ${PN}-dev depends on it. This case
has been handled by :
* Using ALLOW_EMPTY:${PN} = "1" : forcing ${PN} to be created even
  empty.
* DEV_PKG_DEPENDENCY = "" : Implicitly removing the dependency on ${PN}
* And finally and globally making the ${PN}-dev -> ${PN} relation a
  RRECOMMENDS.

2 patches :
* insane: Add QA check for RRECOMMENDS on non-existent packages
* meta/recipes: Remove empty ${PN}/DEV_PKG_DEPENDENCY workaround

First one create a QA check to try to detect the problematic situation.
The second removes workarounds setup to hide to problematic case.

Together they will prominently show where the problematic cases are.
Next step will be to find a generic way to fix the case.

Fawzi KHABER (2):
  insane: Add QA check for RRECOMMENDS on non-existent packages
  meta/recipes: Remove empty ${PN}/DEV_PKG_DEPENDENCY workarounds

 meta/classes-global/insane.bbclass                    | 11 +++++++++++
 meta/recipes-connectivity/bind/bind_9.18.11.bb        |  1 -
 meta/recipes-core/musl/bsd-headers.bb                 |  1 -
 meta/recipes-core/musl/libssp-nonshared.bb            |  1 -
 meta/recipes-core/newlib/newlib_git.bb                |  3 ---
 meta/recipes-devtools/gcc/libgcc-common.inc           |  4 ----
 meta/recipes-devtools/python/python3_3.11.2.bb        |  1 -
 meta/recipes-graphics/mesa/libglu_9.0.2.bb            |  3 ---
 meta/recipes-graphics/mesa/mesa.inc                   |  3 ---
 .../recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb |  1 -
 meta/recipes-graphics/xorg-lib/xtrans_1.4.0.bb        |  1 -
 meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb  |  1 -
 meta/recipes-graphics/xorg-proto/xorgproto_2022.2.bb  |  3 +--
 meta/recipes-graphics/xorg-util/util-macros_1.20.0.bb |  3 +--
 .../linux-libc-headers/linux-libc-headers.inc         |  1 -
 .../make-mod-scripts/make-mod-scripts_1.0.bb          |  1 -
 .../argp-standalone/argp-standalone_1.4.1.bb          |  1 -
 17 files changed, 13 insertions(+), 27 deletions(-)

Comments

ChenQi Feb. 24, 2023, 3:05 a.m. UTC | #1
I have some concerns about this series of patches.
1. The QA check is not checking for RRECOMMENDS on non-existentent 
packages, it's only checking for non-existent in-recipe packages. That 
is, it's not checking packages from other recipes.
2. If patch 2 is sent, then the patch for 'a general way to fix the 
case' should also be sent, otherwise, we'll be in a situation that a 
bunch of warnings are there but there's no suggested fix and current 
workarounds have been explicitly removed.
3. There are some typos. s/existant/existent.

Looking at the original two issues, Yocto#6839 & Yocto#8222, I agree 
that the appropriate approach is to first create a QA check. However, I 
think this QA check should either:
1. only check for non-existent main package for the dev package (as the 
default value of -dev package is the main package)
or
2. thoroughly check for non-existent packages across recipes (maybe by 
using pkgdata)

Regards,
Qi



On 2/24/23 07:29, Yoann Congal via lists.openembedded.org wrote:
> This series is a work in progress on 2 related bugs :
> * [YOCTO #6839] Handle dev package with no main package more gracefully
> * [YOCTO #8222] Elide dependency from -dev package on main package if
>    there are no shared libraries in it
>
> An empty package ${PN} is not generated by default. This has been a
> problem most frequently seen because ${PN}-dev depends on it. This case
> has been handled by :
> * Using ALLOW_EMPTY:${PN} = "1" : forcing ${PN} to be created even
>    empty.
> * DEV_PKG_DEPENDENCY = "" : Implicitly removing the dependency on ${PN}
> * And finally and globally making the ${PN}-dev -> ${PN} relation a
>    RRECOMMENDS.
>
> 2 patches :
> * insane: Add QA check for RRECOMMENDS on non-existent packages
> * meta/recipes: Remove empty ${PN}/DEV_PKG_DEPENDENCY workaround
>
> First one create a QA check to try to detect the problematic situation.
> The second removes workarounds setup to hide to problematic case.
>
> Together they will prominently show where the problematic cases are.
> Next step will be to find a generic way to fix the case.
>
> Fawzi KHABER (2):
>    insane: Add QA check for RRECOMMENDS on non-existent packages
>    meta/recipes: Remove empty ${PN}/DEV_PKG_DEPENDENCY workarounds
>
>   meta/classes-global/insane.bbclass                    | 11 +++++++++++
>   meta/recipes-connectivity/bind/bind_9.18.11.bb        |  1 -
>   meta/recipes-core/musl/bsd-headers.bb                 |  1 -
>   meta/recipes-core/musl/libssp-nonshared.bb            |  1 -
>   meta/recipes-core/newlib/newlib_git.bb                |  3 ---
>   meta/recipes-devtools/gcc/libgcc-common.inc           |  4 ----
>   meta/recipes-devtools/python/python3_3.11.2.bb        |  1 -
>   meta/recipes-graphics/mesa/libglu_9.0.2.bb            |  3 ---
>   meta/recipes-graphics/mesa/mesa.inc                   |  3 ---
>   .../recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb |  1 -
>   meta/recipes-graphics/xorg-lib/xtrans_1.4.0.bb        |  1 -
>   meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb  |  1 -
>   meta/recipes-graphics/xorg-proto/xorgproto_2022.2.bb  |  3 +--
>   meta/recipes-graphics/xorg-util/util-macros_1.20.0.bb |  3 +--
>   .../linux-libc-headers/linux-libc-headers.inc         |  1 -
>   .../make-mod-scripts/make-mod-scripts_1.0.bb          |  1 -
>   .../argp-standalone/argp-standalone_1.4.1.bb          |  1 -
>   17 files changed, 13 insertions(+), 27 deletions(-)
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#177640): https://lists.openembedded.org/g/openembedded-core/message/177640
> Mute This Topic: https://lists.openembedded.org/mt/97195657/3618072
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [Qi.Chen@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Yoann Congal Feb. 24, 2023, 11:06 a.m. UTC | #2
Hi,

On 2/24/23 04:05, ChenQi wrote:
> I have some concerns about this series of patches.
> 1. The QA check is not checking for RRECOMMENDS on non-existentent packages, it's only checking for non-existent in-recipe packages. That is, it's not checking packages from other recipes.

Yes, you're right. Our (non-written) reasoning was :
* a out-of-recipe RRECOMMENDS link to a package that won't be built seems totally legitimate (AFAIK, if A RRECOMMENDS B, A has no way to know if B will be built)
* but, for a in-recipe RRECOMMENDS. It shows that the recipe is not internally consistent. So the QA_WARN is legitimate, I guess?

> 2. If patch 2 is sent, then the patch for 'a general way to fix the case' should also be sent, otherwise, we'll be in a situation that a bunch of warnings are there but there's no suggested fix and current workarounds have been explicitly removed.

Yes, I guess some context was missing here as well : these 2 patches are the first step to fix Yocto#6839 & Yocto#8222.
The way to properly fix these is not obvious right now and to help Richard, we pushed these to make the problem appear more clearly.
These are not ready to be merge as-is (hence the RFC tag on the cover letter... which, I now notice, lacks in the patches... sorry)


> 3. There are some typos. s/existant/existent.

Will fix those. Thanks!

> Looking at the original two issues, Yocto#6839 & Yocto#8222, I agree that the appropriate approach is to first create a QA check. However, I think this QA check should either:
> 1. only check for non-existent main package for the dev package (as the default value of -dev package is the main package)
> or
> 2. thoroughly check for non-existent packages across recipes (maybe by using pkgdata)

This is exactly the kind of discussion we need to have. Thanks!

I'm leaning towards "1." but still, I think, it should be generalized to any in-recipe RRECOMMENDS links.

Regards,
 
> Regards,
> Qi
> 
> 
> 
> On 2/24/23 07:29, Yoann Congal via lists.openembedded.org wrote:
>> This series is a work in progress on 2 related bugs :
>> * [YOCTO #6839] Handle dev package with no main package more gracefully
>> * [YOCTO #8222] Elide dependency from -dev package on main package if
>>    there are no shared libraries in it
>>
>> An empty package ${PN} is not generated by default. This has been a
>> problem most frequently seen because ${PN}-dev depends on it. This case
>> has been handled by :
>> * Using ALLOW_EMPTY:${PN} = "1" : forcing ${PN} to be created even
>>    empty.
>> * DEV_PKG_DEPENDENCY = "" : Implicitly removing the dependency on ${PN}
>> * And finally and globally making the ${PN}-dev -> ${PN} relation a
>>    RRECOMMENDS.
>>
>> 2 patches :
>> * insane: Add QA check for RRECOMMENDS on non-existent packages
>> * meta/recipes: Remove empty ${PN}/DEV_PKG_DEPENDENCY workaround
>>
>> First one create a QA check to try to detect the problematic situation.
>> The second removes workarounds setup to hide to problematic case.
>>
>> Together they will prominently show where the problematic cases are.
>> Next step will be to find a generic way to fix the case.
>>
>> Fawzi KHABER (2):
>>    insane: Add QA check for RRECOMMENDS on non-existent packages
>>    meta/recipes: Remove empty ${PN}/DEV_PKG_DEPENDENCY workarounds
>>
>>   meta/classes-global/insane.bbclass                    | 11 +++++++++++
>>   meta/recipes-connectivity/bind/bind_9.18.11.bb        |  1 -
>>   meta/recipes-core/musl/bsd-headers.bb                 |  1 -
>>   meta/recipes-core/musl/libssp-nonshared.bb            |  1 -
>>   meta/recipes-core/newlib/newlib_git.bb                |  3 ---
>>   meta/recipes-devtools/gcc/libgcc-common.inc           |  4 ----
>>   meta/recipes-devtools/python/python3_3.11.2.bb        |  1 -
>>   meta/recipes-graphics/mesa/libglu_9.0.2.bb            |  3 ---
>>   meta/recipes-graphics/mesa/mesa.inc                   |  3 ---
>>   .../recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb |  1 -
>>   meta/recipes-graphics/xorg-lib/xtrans_1.4.0.bb        |  1 -
>>   meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb  |  1 -
>>   meta/recipes-graphics/xorg-proto/xorgproto_2022.2.bb  |  3 +--
>>   meta/recipes-graphics/xorg-util/util-macros_1.20.0.bb |  3 +--
>>   .../linux-libc-headers/linux-libc-headers.inc         |  1 -
>>   .../make-mod-scripts/make-mod-scripts_1.0.bb          |  1 -
>>   .../argp-standalone/argp-standalone_1.4.1.bb          |  1 -
>>   17 files changed, 13 insertions(+), 27 deletions(-)
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#177640): https://lists.openembedded.org/g/openembedded-core/message/177640
>> Mute This Topic: https://lists.openembedded.org/mt/97195657/3618072
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [Qi.Chen@windriver.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>