dconf: conditionally depend on gtk+3
dconf only uses gtk for dconf-editor. compiling editor conditionally allows to remove the hard dependency. so dconf can be used on systems without GUI.
while writing this patch I came across some minor bugs that are also fixed with this series.
PATCH 1/3 dconf: depends on dbus
From: Andy Kling <[email protected]>
configure of dconf requires dbus
| checking for dbus... no | configure: error: Package requirements (dbus-1) were not met: | | No package 'dbus-1' found --- meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb +1 -1
@@ -9,7 +9,7 @@ SRC_URI[archive.md5sum] = "69a12ed68893f2e1e81ac4e531bc1515" SRC_URI[archive.sha256sum] = "109b1bc6078690af1ed88cb144ef5c5aee7304769d8bdc82ed48c3696f10c955" GNOME_COMPRESS_TYPE = "xz" -DEPENDS = "glib-2.0 gtk+3 libxml2 intltool-native" +DEPENDS = "dbus glib-2.0 gtk+3 libxml2 intltool-native" inherit vala gtk-doc distro_features_check
Signature · 1 line
2.11.0
PATCH 2/3 dconf: fix bash completion in wrong package
In reply to [email protected]From: Andy Kling <[email protected]>
bash completion is used by dconf itself not by editor. move file to main package.
--- meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb +1 -1
@@ -22,10 +22,10 @@ PACKAGES =+ "dconf-editor" FILES_${PN} += " \ ${datadir}/dbus-1 \ ${libdir}/gio/modules/*.so \ + ${datadir}/bash-completion \ " FILES_dconf-editor = " \ ${bindir}/dconf-editor \ ${datadir}/icons \ - ${datadir}/bash-completion \ " FILES_${PN}-dbg += "${libdir}/gio/modules/.debug/libdconfsettings.so"
Signature · 1 line
2.11.0
PATCH 3/3 dconf: make gtk+3 dependency optional
In reply to [email protected]From: Andy Kling <[email protected]>
dconf requires gtk+3 only for dconf-editor and is useful even on systems without gui.
add PACKAGECONFIG for editor, enable it by default if x11 is present in DISTRO_FEATURES
add gtk+3 to DEPENDS only if editor is present in PACKAGECONFIG
add x11 to REQUIRED_DISTRO_FEATURES only if editor is enabled
Note: editor will be dropped from dconf in version 0.23.1
--- meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb +8 -3
@@ -9,15 +9,20 @@ SRC_URI[archive.md5sum] = "69a12ed68893f2e1e81ac4e531bc1515" SRC_URI[archive.sha256sum] = "109b1bc6078690af1ed88cb144ef5c5aee7304769d8bdc82ed48c3696f10c955" GNOME_COMPRESS_TYPE = "xz" -DEPENDS = "dbus glib-2.0 gtk+3 libxml2 intltool-native" +DEPENDS = "dbus glib-2.0 gtk+3 libxml2 intltool-native ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk+3", "", d)}" inherit vala gtk-doc distro_features_check -REQUIRED_DISTRO_FEATURES = "x11" +PACKAGECONFIG ??= " ${@bb.utils.contains("DISTRO_FEATURES", "x11", "editor", "", d)}" + +#note: editor will be removed in version 0.23.1 +PACKAGECONFIG[editor] = "--enable-editor,--disable-editor,gtk+3" + +REQUIRED_DISTRO_FEATURES = ${@bb.utils.contains("PACKAGECONFIG", "editor", "x11", "", d)}" EXTRA_OECONF += "--disable-man" -PACKAGES =+ "dconf-editor" +PACKAGES =+ "${@bb.utils.contains("DISTRO_FEATURES", "x11", "dconf-editor", "", d)}" FILES_${PN} += " \ ${datadir}/dbus-1 \
Signature · 1 line
2.11.0
v02 fix typo introduced during rebase
sorry for the noise :/
PATCH v2 1/3 dconf: depends on dbus
From: Andy Kling <[email protected]>
configure of dconf requires dbus
| checking for dbus... no | configure: error: Package requirements (dbus-1) were not met: | | No package 'dbus-1' found --- meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb +1 -1
@@ -9,7 +9,7 @@ SRC_URI[archive.md5sum] = "69a12ed68893f2e1e81ac4e531bc1515" SRC_URI[archive.sha256sum] = "109b1bc6078690af1ed88cb144ef5c5aee7304769d8bdc82ed48c3696f10c955" GNOME_COMPRESS_TYPE = "xz" -DEPENDS = "glib-2.0 gtk+3 libxml2 intltool-native" +DEPENDS = "dbus glib-2.0 gtk+3 libxml2 intltool-native" inherit vala gtk-doc distro_features_check
Signature · 1 line
2.11.0
PATCH v2 2/3 dconf: fix bash completion in wrong package
In reply to [email protected]From: Andy Kling <[email protected]>
bash completion is used by dconf itself not by editor. move file to main package.
--- meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb +1 -1
@@ -22,10 +22,10 @@ PACKAGES =+ "dconf-editor" FILES_${PN} += " \ ${datadir}/dbus-1 \ ${libdir}/gio/modules/*.so \ + ${datadir}/bash-completion \ " FILES_dconf-editor = " \ ${bindir}/dconf-editor \ ${datadir}/icons \ - ${datadir}/bash-completion \ " FILES_${PN}-dbg += "${libdir}/gio/modules/.debug/libdconfsettings.so"
Signature · 1 line
2.11.0
PATCH v2 3/3 dconf: make gtk+3 dependency optional
In reply to [email protected]From: Andy Kling <[email protected]>
dconf requires gtk+3 only for dconf-editor and is useful even on systems without gui.
add PACKAGECONFIG for editor, enable it by default if x11 is present in DISTRO_FEATURES
add gtk+3 to DEPENDS only if editor is present in PACKAGECONFIG
add x11 to REQUIRED_DISTRO_FEATURES only if editor is enabled
Note: editor will be dropped from dconf in version 0.23.1
--- meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb +8 -3
@@ -9,15 +9,20 @@ SRC_URI[archive.md5sum] = "69a12ed68893f2e1e81ac4e531bc1515" SRC_URI[archive.sha256sum] = "109b1bc6078690af1ed88cb144ef5c5aee7304769d8bdc82ed48c3696f10c955" GNOME_COMPRESS_TYPE = "xz" -DEPENDS = "dbus glib-2.0 gtk+3 libxml2 intltool-native" +DEPENDS = "dbus glib-2.0 libxml2 intltool-native ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk+3", "", d)}" inherit vala gtk-doc distro_features_check -REQUIRED_DISTRO_FEATURES = "x11" +PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "editor", "", d)}" + +#note: editor will be removed in version 0.23.1 +PACKAGECONFIG[editor] = "--enable-editor,--disable-editor,gtk+3" + +REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains("PACKAGECONFIG", "editor", "x11", "", d)}" EXTRA_OECONF += "--disable-man" -PACKAGES =+ "dconf-editor" +PACKAGES =+ "${@bb.utils.contains("DISTRO_FEATURES", "x11", "dconf-editor", "", d)}" FILES_${PN} += " \ ${datadir}/dbus-1 \
Signature · 1 line
2.11.0
Re: [meta-gnome][PATCH v02 3/3] dconf: make gtk+3 dependency optional
Quoted 25 lines · On Wed, Feb 8, 2017 at 3:31 PM, <[email protected]> wrote:
From: Andy Kling <[email protected]>
dconf requires gtk+3 only for dconf-editor and is useful even on systems without gui.
add PACKAGECONFIG for editor, enable it by default if x11 is present in
DISTRO_FEATURESadd gtk+3 to DEPENDS only if editor is present in PACKAGECONFIG
add x11 to
REQUIRED_DISTRO_FEATURESonly if editor is enabledNote: editor will be dropped from dconf in version 0.23.1
--- meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb +0
-0@@ -9,15 +9,20 @@ SRC_URI[archive.md5sum] = "69a12ed68893f2e1e81ac4e531bc1515" SRC_URI[archive.sha256sum] = "109b1bc6078690af1ed88cb144ef5c5aee7304769d8bdc82ed48c3696f10c955" GNOME_COMPRESS_TYPE = "xz"
meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb SRC_URI[archive.md5sum] = "69a12ed68893f2e1e81ac4e531bc1515" · line 19
Quoted 10 lines
meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb +5
-2-DEPENDS = "dbus glib-2.0 gtk+3 libxml2 intltool-native" +DEPENDS = "dbus glib-2.0 libxml2 intltool-native ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk+3", "", d)}" inherit vala gtk-doc distro_features_check -REQUIRED_DISTRO_FEATURES = "x11" +PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "editor", "", d)}" + +#note: editor will be removed in version 0.23.1 +PACKAGECONFIG[editor] = "--enable-editor,--disable-editor,gtk+3"
You add gtk+3 twice: in DEPENDS above and here. Just keep it in PACKAGECONFIG
Andreas
Re: [meta-gnome][PATCH v02 3/3] dconf: make gtk+3 dependency optional
many thanks for your review.
no idea how I only recognized rdepends in base class.
v03
remove duplicated depends to gtk+3
rebase from master to master-next
v02
fix typo
[oe] [meta-gnome][PATCH v03 1/3] dconf: depends on dbus [oe] [meta-gnome][PATCH v03 2/3] dconf: fix bash completion in wrong [oe] [meta-gnome][PATCH v03 3/3] dconf: make gtk+3 dependency
PATCH v3 1/3 dconf: depends on dbus
From: Andy Kling <[email protected]>
configure of dconf requires dbus
| checking for dbus... no | configure: error: Package requirements (dbus-1) were not met: | | No package 'dbus-1' found --- meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb +1 -1
@@ -9,7 +9,7 @@ SRC_URI[archive.md5sum] = "69a12ed68893f2e1e81ac4e531bc1515" SRC_URI[archive.sha256sum] = "109b1bc6078690af1ed88cb144ef5c5aee7304769d8bdc82ed48c3696f10c955" GNOME_COMPRESS_TYPE = "xz" -DEPENDS = "glib-2.0 gtk+3 libxml2 intltool-native" +DEPENDS = "dbus glib-2.0 gtk+3 libxml2 intltool-native" inherit vala gtk-doc distro_features_check
Signature · 1 line
2.11.0
PATCH v3 2/3 dconf: fix bash completion in wrong package
In reply to [email protected]From: Andy Kling <[email protected]>
bash completion is used by dconf itself not by editor. move file to main package.
--- meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb +1 -1
@@ -22,10 +22,10 @@ PACKAGES =+ "dconf-editor" FILES_${PN} += " \ ${datadir}/dbus-1 \ ${libdir}/gio/modules/*.so \ + ${datadir}/bash-completion \ " FILES_dconf-editor = " \ ${bindir}/dconf-editor \ ${datadir}/icons \ - ${datadir}/bash-completion \ " FILES_${PN}-dbg += "${libdir}/gio/modules/.debug/libdconfsettings.so"
Signature · 1 line
2.11.0
PATCH v3 3/3 dconf: make gtk+3 dependency optional
In reply to [email protected]From: Andy Kling <[email protected]>
dconf requires gtk+3 only for dconf-editor and is useful even on systems without gui.
add PACKAGECONFIG for editor, enable it by default if x11 is present in DISTRO_FEATURES
add x11 to REQUIRED_DISTRO_FEATURES only if editor is enabled
Note: editor will be dropped from dconf in version 0.23.1
--- meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
meta-gnome/recipes-gnome/dconf/dconf_0.18.0.bb +8 -3
@@ -9,15 +9,20 @@ SRC_URI[archive.md5sum] = "69a12ed68893f2e1e81ac4e531bc1515" SRC_URI[archive.sha256sum] = "109b1bc6078690af1ed88cb144ef5c5aee7304769d8bdc82ed48c3696f10c955" GNOME_COMPRESS_TYPE = "xz" -DEPENDS = "dbus glib-2.0 gtk+3 libxml2 intltool-native" +DEPENDS = "dbus glib-2.0 libxml2 intltool-native" inherit vala gtk-doc distro_features_check -REQUIRED_DISTRO_FEATURES = "x11" +PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "editor", "", d)}" + +#note: editor will be removed in version 0.23.1 +PACKAGECONFIG[editor] = "--enable-editor,--disable-editor,gtk+3" + +REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains("PACKAGECONFIG", "editor", "x11", "", d)}" EXTRA_OECONF += "--disable-man" -PACKAGES =+ "dconf-editor" +PACKAGES =+ "${@bb.utils.contains("DISTRO_FEATURES", "x11", "dconf-editor", "", d)}" FILES_${PN} += " \ ${datadir}/dbus-1 \
Signature · 1 line
2.11.0