Skip to contentSkip to conversation

gstreamer1.0-plugins-good: Fix libsoup runtime dependency

PATCH Superseded Tom Hochstein 2 participants 3 messages Jan 13, 2023 – Jan 14, 2023

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gstreamer1.0-plugins-good: Fix libsoup runtime dependency

The runtime dependency on libsoup set via PACKAGECONFIG does not work. The problem is the dependency is placed on the main package, but the soup package has no dependency on the main package.

I considered modifying the call to do_split_packages from gstreamer1.0-plugins-packaging.inc, changing extra_depends from '' to None:

```
    extra_depends  -- extra runtime dependencies (RDEPENDS) to be set for
                      all packages. The default value of None causes a
                      dependency on the main package (${PN}) - if you do
                      not want this, pass '' for this parameter.
```

However, the problem with this solution is that it does add the runtime dependency to _all_ such split packages.

So, fix the problem with an explicit runtime dependency.

---
 .../gstreamer/gstreamer1.0-plugins-good_1.20.5.bb      | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.5.bb +3 -7
index f7ade89ef8..ed48c57311 100644
@@ -19,6 +19,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
 DEPENDS += "gstreamer1.0-plugins-base libcap zlib"
 RPROVIDES:${PN}-pulseaudio += "${PN}-pulse"
 RPROVIDES:${PN}-soup += "${PN}-souphttpsrc"
+RDEPENDS:${PN}-soup += "${@bb.utils.contains('PACKAGECONFIG', 'soup2', 'libsoup-2.4', 'libsoup', d)}"
 
 PACKAGECONFIG_SOUP ?= "soup3"
 
@@ -52,13 +53,8 @@ PACKAGECONFIG[libv4l2]    = "-Dv4l2-libv4l2=enabled,-Dv4l2-libv4l2=disabled,v4l-
 PACKAGECONFIG[mpg123]     = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123"
 PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio"
 PACKAGECONFIG[qt5]        = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native ${QT5WAYLANDDEPENDS}"
-# Starting with version 1.20, the GStreamer soup plugin loads libsoup with dlopen()
-# instead of linking to it. And instead of using the default libsoup C headers, it
-# uses its own stub header. Consequently, objdump will not show the libsoup .so as
-# a dependency, and libsoup won't be added to an image. Fix this by setting libsoup
-# as RDEPEND.
-PACKAGECONFIG[soup2] = "-Dsoup=enabled,,libsoup-2.4,libsoup-2.4,,soup3"
-PACKAGECONFIG[soup3] = "-Dsoup=enabled,,libsoup,libsoup,,soup2"
+PACKAGECONFIG[soup2]      = "-Dsoup=enabled,,,,,soup3"
+PACKAGECONFIG[soup3]      = "-Dsoup=enabled,,,,,soup2"
 PACKAGECONFIG[speex]      = "-Dspeex=enabled,-Dspeex=disabled,speex"
 PACKAGECONFIG[rpi]        = "-Drpicamsrc=enabled,-Drpicamsrc=disabled,userland"
 PACKAGECONFIG[taglib]     = "-Dtaglib=enabled,-Dtaglib=disabled,taglib"
Signature · 1 line
2.25.1
#1 lore raw
Quoted 18 lines · Tom Hochstein

The runtime dependency on libsoup set via PACKAGECONFIG does not work. The problem is the dependency is placed on the main package, but the soup package has no dependency on the main package.

I considered modifying the call to do_split_packages from gstreamer1.0-plugins-packaging.inc, changing extra_depends from '' to None:

```
    extra_depends  -- extra runtime dependencies (RDEPENDS) to be set for
                      all packages. The default value of None causes a
                      dependency on the main package (${PN}) - if you do
                      not want this, pass '' for this parameter.
```

However, the problem with this solution is that it does add the runtime dependency to _all_ such split packages.

Quoted 6 lines

So, fix the problem with an explicit runtime dependency.

---
 .../gstreamer/gstreamer1.0-plugins-good_1.20.5.bb      | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

This threw a load of warnings/errors, see:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/4792

Cheers,

Richard

#2 lore raw

Thanks. An earlier commit [1] did add libsoup back to the DEPENDS list, though it was not mentioned in the commit message, and I overlooked it in the code what with the dropping of the -Dsoup=disabled.

[1] https://github.com/openembedded/openembedded-core/commit/88d30848981db2cb7b1f2021ba07e40976cd789f

V2 coming.

-----Original Message-----
From: Richard Purdie <[email protected]>
Sent: Saturday, January 14, 2023 11:02 AM
To: Tom Hochstein <[email protected]>; [email protected]
Subject: Re: [OE-core] [PATCH] gstreamer1.0-plugins-good: Fix libsoup runtime dependency

Quoted 18 lines · Tom Hochstein

The runtime dependency on libsoup set via PACKAGECONFIG does not work. The problem is the dependency is placed on the main package, but the soup package has no dependency on the main package.

I considered modifying the call to do_split_packages from gstreamer1.0-plugins-packaging.inc, changing extra_depends from '' to None:

```
    extra_depends  -- extra runtime dependencies (RDEPENDS) to be set for
                      all packages. The default value of None causes a
                      dependency on the main package (${PN}) - if you do
                      not want this, pass '' for this parameter.
```

However, the problem with this solution is that it does add the runtime dependency to _all_ such split packages.

Quoted 6 lines

So, fix the problem with an explicit runtime dependency.

---
 .../gstreamer/gstreamer1.0-plugins-good_1.20.5.bb      | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

This threw a load of warnings/errors, see:

https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fautobuilder.yoctoproject.org%2Ftyphoon%2F%23%2Fbuilders%2F83%2Fbuilds%2F4792&data=05%7C01%7Ctom.hochstein%40nxp.com%7C2a738415ebef4c494dd108daf6511d1f%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638093125482952300%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cfdxmtUBAwPNqIcKtqSxdABCkPq6O6S42ZEkn1CrDAg%3D&reserved=0

Cheers,

Richard