[dunfell,PATCHv2] libdrm: add libdrm-{nouveau,radeon,intel} to RPROVIDES

Message ID 20220529095251.11410-1-flowergom@gmail.com
State New, archived
Headers show
Series [dunfell,PATCHv2] libdrm: add libdrm-{nouveau,radeon,intel} to RPROVIDES | expand

Commit Message

Minjae Kim May 29, 2022, 9:52 a.m. UTC
The libdrm-{nouveau,radeon,intel} are generated by libdrm recipe.
To use these libraries as a dependency in another component,
It should be explicitly added as RPROVIDES.

Signed-off-by:Minjae Kim <flowergom@gmail.com>
---
 meta/recipes-graphics/drm/libdrm_2.4.101.bb | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Martin Jansa May 29, 2022, 4:15 p.m. UTC | #1
I'm sorry, but this still doesn't make much sense to me. RPROVIDES doesn't
help with build time dependency and if something has runtime dependency
explicitly on libdrm-nouveau, then using libdrm as suitable provider
doesn't seem right, what exactly is the usecase for this, isn't it just
hiding the issue somewhere else?

On Sun, May 29, 2022 at 11:53 AM Minjae Kim <flowergom@gmail.com> wrote:

> The libdrm-{nouveau,radeon,intel} are generated by libdrm recipe.
> To use these libraries as a dependency in another component,
> It should be explicitly added as RPROVIDES.
>
> Signed-off-by:Minjae Kim <flowergom@gmail.com>
> ---
>  meta/recipes-graphics/drm/libdrm_2.4.101.bb | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/meta/recipes-graphics/drm/libdrm_2.4.101.bb
> b/meta/recipes-graphics/drm/libdrm_2.4.101.bb
> index 8ec566faa9..75efabf918 100644
> --- a/meta/recipes-graphics/drm/libdrm_2.4.101.bb
> +++ b/meta/recipes-graphics/drm/libdrm_2.4.101.bb
> @@ -57,3 +57,9 @@ FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*
> ${datadir}/${PN}/amdgpu.ids"
>  FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
>
>  BBCLASSEXTEND = "native nativesdk"
> +
> +RPROVIDES_${PN} += " \
> +    ${PN}-nouveau \
> +    ${PN}-radeon \
> +    ${PN}-intel \
> +"
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#166231):
> https://lists.openembedded.org/g/openembedded-core/message/166231
> Mute This Topic: https://lists.openembedded.org/mt/91408949/3617156
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Minjae Kim May 30, 2022, 7:47 a.m. UTC | #2
@Martin,
I don't know why you think I'm hiding something.
I will use this when installing the rpm package using the dnf tool on the target image such as qemu or raspberrypi.

For example,
There is component A.
It needs libdrm-{nouveau,radeon,intel} packages to work properly.
When this A component rpm package is installed using dnf tool on the actual target image,
the libdrm-{nouveau,radeon,intel} packages cannot install at once if the component A had a libdrm as rdepends.

However, If component A has libdrm-{nouveau,radeon,intel} as rdepends,
When these A component packages are installed using dnf, these packages can also be installed at the same time.

Because libdrm-{nouveau,radeon,intel} is not provided as RPROVIDES, these packages cannot be used as rdepends directly.
Martin Jansa May 30, 2022, 8:11 a.m. UTC | #3
I don't think you're hiding something, I just don't understand this
use-case.

libdrm-nouveau rprovides libdrm-nouveau, any package with runtime
dependency dnf should be able to install and pull libdrm-nouveau package
(_not_ libdrm package) to satisfy that dependency.

Why doesn't this work for libdrm in your case? Do you have libdrm-nouveau
package created and nouveau packaged inside?

Cheers,

On Mon, May 30, 2022 at 9:47 AM Minjae Kim <flowergom@gmail.com> wrote:

> @Martin,
> I don't know why you think I'm hiding something.
> I will use this when installing the rpm package using the dnf tool on the
> target image such as qemu or raspberrypi.
>
> For example,
> There is component A.
> It needs libdrm-{nouveau,radeon,intel} packages to work properly.
> When this A component rpm package is installed using dnf tool on the
> actual target image,
> the libdrm-{nouveau,radeon,intel} packages cannot install at once if the
> component A had a libdrm as rdepends.
>
> However, If component A has libdrm-{nouveau,radeon,intel} as rdepends,
> When these A component packages are installed using dnf, these packages
> can also be installed at the same time.
>
> Because libdrm-{nouveau,radeon,intel} is not provided as RPROVIDES, these
> packages cannot be used as rdepends directly.
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#166271):
> https://lists.openembedded.org/g/openembedded-core/message/166271
> Mute This Topic: https://lists.openembedded.org/mt/91408949/3617156
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

Patch

diff --git a/meta/recipes-graphics/drm/libdrm_2.4.101.bb b/meta/recipes-graphics/drm/libdrm_2.4.101.bb
index 8ec566faa9..75efabf918 100644
--- a/meta/recipes-graphics/drm/libdrm_2.4.101.bb
+++ b/meta/recipes-graphics/drm/libdrm_2.4.101.bb
@@ -57,3 +57,9 @@  FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.* ${datadir}/${PN}/amdgpu.ids"
 FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
 
 BBCLASSEXTEND = "native nativesdk"
+
+RPROVIDES_${PN} += " \
+    ${PN}-nouveau \
+    ${PN}-radeon \
+    ${PN}-intel \
+"