Message ID | 20230122070632.756193-1-f_l_k@t-online.de |
---|---|
State | Accepted, archived |
Commit | b5ab0d1795e68c29a2b69f99a6b46b920e879ec7 |
Headers | show |
Series | gtk4: add PACKAGECONFIG for cloudproviders | expand |
On Sun, 2023-01-22 at 08:06 +0100, Markus Volk wrote: > - Add missing cups runtime dependency > - Create packages for the printbackends only for target > This fixes: > > NOTE: Multiple providers are available for runtime gtk4-printbackend-cups (gtk4, gtk4-native) > Consider defining a PREFERRED_RPROVIDER entry to match gtk4-printbackend-cups > NOTE: Multiple providers are available for runtime gtk4-printbackend-file (gtk4, gtk4-native) > Consider defining a PREFERRED_RPROVIDER entry to match gtk4-printbackend-file > > Signed-off-by: Markus Volk <f_l_k@t-online.de> > --- > meta/recipes-gnome/gtk+/gtk4_4.8.3.bb | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/meta/recipes-gnome/gtk+/gtk4_4.8.3.bb b/meta/recipes-gnome/gtk+/gtk4_4.8.3.bb > index 6101905128..5112d3b38b 100644 > --- a/meta/recipes-gnome/gtk+/gtk4_4.8.3.bb > +++ b/meta/recipes-gnome/gtk+/gtk4_4.8.3.bb > @@ -65,7 +65,8 @@ PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d) > > PACKAGECONFIG[x11] = "-Dx11-backend=true,-Dx11-backend=false,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes xinerama" > PACKAGECONFIG[wayland] = "-Dwayland-backend=true,-Dwayland-backend=false,wayland wayland-protocols virtual/egl virtual/libgles2 wayland-native" > -PACKAGECONFIG[cups] = "-Dprint-cups=enabled,-Dprint-cups=disabled,cups" > +PACKAGECONFIG[cloudproviders] = "-Dcloudproviders=enabled,-Dcloudproviders=disabled,libcloudproviders" > +PACKAGECONFIG[cups] = "-Dprint-cups=enabled,-Dprint-cups=disabled,cups,cups" > PACKAGECONFIG[colord] = "-Dcolord=enabled,-Dcolord=disabled,colord" > PACKAGECONFIG[iso-codes] = ",,iso-codes,iso-codes" > PACKAGECONFIG[ffmpeg] = "-Dmedia-ffmpeg=enabled,-Dmedia-ffmpeg=disabled,ffmpeg" This bit is fine. > @@ -114,7 +115,7 @@ RRECOMMENDS:${PN} = "${GTKBASE_RRECOMMENDS}" > RRECOMMENDS:${PN}:libc-glibc = "${GTKGLIBC_RRECOMMENDS}" > RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland-protocols", "", d)}" > > -PACKAGES_DYNAMIC += "^gtk4-printbackend-.*" > +PACKAGES_DYNAMIC:class-target += "^gtk4-printbackend-.*" > python populate_packages:prepend () { > import os.path > This bit is really a bug in the native.bbclass class extension code and I'd really prefer to fix that rather than needing every recipe with a BBCLASSEXTEND native to handle PACKAGES_DYNAMIC specially. You'll see that nativesdk.bbclass does: clsextend.map_regexp_variable("PACKAGES_DYNAMIC") but native.bbclass doesn't do anything with PACKAGES_DYANAMIC which is the issue. Could you see if the patch below helps please? diff --git a/meta/classes-recipe/native.bbclass b/meta/classes-recipe/native.bbclass index 1e94585f3e3..cfd299d0c8c 100644 --- a/meta/classes-recipe/native.bbclass +++ b/meta/classes-recipe/native.bbclass @@ -139,7 +139,7 @@ python native_virtclass_handler () { if "native" not in classextend: return - def map_dependencies(varname, d, suffix = "", selfref=True): + def map_dependencies(varname, d, suffix = "", selfref=True, regex=False): if suffix: varname = varname + ":" + suffix deps = d.getVar(varname) @@ -148,7 +148,9 @@ python native_virtclass_handler () { deps = bb.utils.explode_deps(deps) newdeps = [] for dep in deps: - if dep == pn: + if regex and dep.startswith("^") and dep.endswith("$"): + newdeps.append(dep[:-1].replace(pn, bpn) + "-native$") + elif dep == pn: if not selfref: continue newdeps.append(dep) @@ -171,6 +173,7 @@ python native_virtclass_handler () { map_dependencies("RPROVIDES", e.data, pkg) map_dependencies("RREPLACES", e.data, pkg) map_dependencies("PACKAGES", e.data) + map_dependencies("PACKAGES_DYNAMIC", e.data, regex=True) provides = e.data.getVar("PROVIDES") nprovides = [] Cheers, Richard
Thanks for the propper fix. I've sent a v2 that excludes the second bit Am Mi, 25. Jan 2023 um 14:24:39 +0000 schrieb Richard Purdie <richard.purdie@linuxfoundation.org>: > On Sun, 2023-01-22 at 08:06 +0100, Markus Volk wrote: >> - Add missing cups runtime dependency >> - Create packages for the printbackends only for target >> This fixes: >> >> NOTE: Multiple providers are available for runtime >> gtk4-printbackend-cups (gtk4, gtk4-native) >> Consider defining a PREFERRED_RPROVIDER entry to match >> gtk4-printbackend-cups >> NOTE: Multiple providers are available for runtime >> gtk4-printbackend-file (gtk4, gtk4-native) >> Consider defining a PREFERRED_RPROVIDER entry to match >> gtk4-printbackend-file >> >> Signed-off-by: Markus Volk <f_l_k@t-online.de >> <mailto:f_l_k@t-online.de>> >> --- >> meta/recipes-gnome/gtk+/gtk4_4.8.3.bb | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/meta/recipes-gnome/gtk+/gtk4_4.8.3.bb >> b/meta/recipes-gnome/gtk+/gtk4_4.8.3.bb >> index 6101905128..5112d3b38b 100644 >> --- a/meta/recipes-gnome/gtk+/gtk4_4.8.3.bb >> +++ b/meta/recipes-gnome/gtk+/gtk4_4.8.3.bb >> @@ -65,7 +65,8 @@ PACKAGECONFIG:class-nativesdk = >> "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d) >> >> PACKAGECONFIG[x11] = >> "-Dx11-backend=true,-Dx11-backend=false,at-spi2-atk fontconfig >> libx11 libxext libxcursor libxi libxdamage libxrandr libxrender >> libxcomposite libxfixes xinerama" >> PACKAGECONFIG[wayland] = >> "-Dwayland-backend=true,-Dwayland-backend=false,wayland >> wayland-protocols virtual/egl virtual/libgles2 wayland-native" >> -PACKAGECONFIG[cups] = >> "-Dprint-cups=enabled,-Dprint-cups=disabled,cups" >> +PACKAGECONFIG[cloudproviders] = >> "-Dcloudproviders=enabled,-Dcloudproviders=disabled,libcloudproviders" >> +PACKAGECONFIG[cups] = >> "-Dprint-cups=enabled,-Dprint-cups=disabled,cups,cups" >> PACKAGECONFIG[colord] = "-Dcolord=enabled,-Dcolord=disabled,colord" >> PACKAGECONFIG[iso-codes] = ",,iso-codes,iso-codes" >> PACKAGECONFIG[ffmpeg] = >> "-Dmedia-ffmpeg=enabled,-Dmedia-ffmpeg=disabled,ffmpeg" > > This bit is fine. > >> @@ -114,7 +115,7 @@ RRECOMMENDS:${PN} = "${GTKBASE_RRECOMMENDS}" >> RRECOMMENDS:${PN}:libc-glibc = "${GTKGLIBC_RRECOMMENDS}" >> RDEPENDS:${PN}-dev += "${@bb.utils.contains >> <mailto:${@bb.utils.contains>("PACKAGECONFIG", "wayland", >> "wayland-protocols", "", d)}" >> >> -PACKAGES_DYNAMIC += "^gtk4-printbackend-.*" >> +PACKAGES_DYNAMIC:class-target += "^gtk4-printbackend-.*" >> python populate_packages:prepend () { >> import os.path >> > > This bit is really a bug in the native.bbclass class extension code > and > I'd really prefer to fix that rather than needing every recipe with a > BBCLASSEXTEND native to handle PACKAGES_DYNAMIC specially. > > You'll see that nativesdk.bbclass does: > > clsextend.map_regexp_variable("PACKAGES_DYNAMIC") > > but native.bbclass doesn't do anything with PACKAGES_DYANAMIC which is > the issue. Could you see if the patch below helps please? > > diff --git a/meta/classes-recipe/native.bbclass > b/meta/classes-recipe/native.bbclass > index 1e94585f3e3..cfd299d0c8c 100644 > --- a/meta/classes-recipe/native.bbclass > +++ b/meta/classes-recipe/native.bbclass > @@ -139,7 +139,7 @@ python native_virtclass_handler () { > if "native" not in classextend: > return > > - def map_dependencies(varname, d, suffix = "", selfref=True): > + def map_dependencies(varname, d, suffix = "", selfref=True, > regex=False): > if suffix: > varname = varname + ":" + suffix > deps = d.getVar(varname) > @@ -148,7 +148,9 @@ python native_virtclass_handler () { > deps = bb.utils.explode_deps(deps) > newdeps = [] > for dep in deps: > - if dep == pn: > + if regex and dep.startswith("^") and dep.endswith("$"): > + newdeps.append(dep[:-1].replace(pn, bpn) + > "-native$") > + elif dep == pn: > if not selfref: > continue > newdeps.append(dep) > @@ -171,6 +173,7 @@ python native_virtclass_handler () { > map_dependencies("RPROVIDES", e.data, pkg) > map_dependencies("RREPLACES", e.data, pkg) > map_dependencies("PACKAGES", e.data) > + map_dependencies("PACKAGES_DYNAMIC", e.data, regex=True) > > provides = e.data.getVar("PROVIDES") > nprovides = [] > > > Cheers, > > Richard > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#176350): > <https://lists.openembedded.org/g/openembedded-core/message/176350> > Mute This Topic: <https://lists.openembedded.org/mt/96449563/3618223> > Group Owner: openembedded-core+owner@lists.openembedded.org > <mailto:openembedded-core+owner@lists.openembedded.org> > Unsubscribe: > <https://lists.openembedded.org/g/openembedded-core/unsub> > [f_l_k@t-online.de <mailto:f_l_k@t-online.de>] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta/recipes-gnome/gtk+/gtk4_4.8.3.bb b/meta/recipes-gnome/gtk+/gtk4_4.8.3.bb index 6101905128..5112d3b38b 100644 --- a/meta/recipes-gnome/gtk+/gtk4_4.8.3.bb +++ b/meta/recipes-gnome/gtk+/gtk4_4.8.3.bb @@ -65,7 +65,8 @@ PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d) PACKAGECONFIG[x11] = "-Dx11-backend=true,-Dx11-backend=false,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes xinerama" PACKAGECONFIG[wayland] = "-Dwayland-backend=true,-Dwayland-backend=false,wayland wayland-protocols virtual/egl virtual/libgles2 wayland-native" -PACKAGECONFIG[cups] = "-Dprint-cups=enabled,-Dprint-cups=disabled,cups" +PACKAGECONFIG[cloudproviders] = "-Dcloudproviders=enabled,-Dcloudproviders=disabled,libcloudproviders" +PACKAGECONFIG[cups] = "-Dprint-cups=enabled,-Dprint-cups=disabled,cups,cups" PACKAGECONFIG[colord] = "-Dcolord=enabled,-Dcolord=disabled,colord" PACKAGECONFIG[iso-codes] = ",,iso-codes,iso-codes" PACKAGECONFIG[ffmpeg] = "-Dmedia-ffmpeg=enabled,-Dmedia-ffmpeg=disabled,ffmpeg" @@ -114,7 +115,7 @@ RRECOMMENDS:${PN} = "${GTKBASE_RRECOMMENDS}" RRECOMMENDS:${PN}:libc-glibc = "${GTKGLIBC_RRECOMMENDS}" RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland-protocols", "", d)}" -PACKAGES_DYNAMIC += "^gtk4-printbackend-.*" +PACKAGES_DYNAMIC:class-target += "^gtk4-printbackend-.*" python populate_packages:prepend () { import os.path
- Add missing cups runtime dependency - Create packages for the printbackends only for target This fixes: NOTE: Multiple providers are available for runtime gtk4-printbackend-cups (gtk4, gtk4-native) Consider defining a PREFERRED_RPROVIDER entry to match gtk4-printbackend-cups NOTE: Multiple providers are available for runtime gtk4-printbackend-file (gtk4, gtk4-native) Consider defining a PREFERRED_RPROVIDER entry to match gtk4-printbackend-file Signed-off-by: Markus Volk <f_l_k@t-online.de> --- meta/recipes-gnome/gtk+/gtk4_4.8.3.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)