Skip to contentSkip to conversation

meta: 4 fixes

PATCH In review Robert Yang 5 participants 15 messages Jun 20, 2019 – Jun 21, 2019

lore
Share & tools
lore
#0 lore raw

cover meta: 4 fixes

The following changes since commit 2106a567820bad438ff78d54a49e3d87da428dcf:

python3: python3: Fix build error x86->x86 (2019-06-19 13:15:55 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/4fixes
http://cgit.openembedded.org//log/?h=rbt/4fixes

Robert Yang (4):
linux-dummy: Add do_compile_kernelmodules
make-mod-scripts: Depends on bison-native update-alternatives.bbclass: run update-alternatives firstly in
postinst script
gtk-icon-cache.bbclass: Depends on gtk+3

 meta/classes/gtk-icon-cache.bbclass                        | 14 ++++++++++----
 meta/classes/update-alternatives.bbclass                   |  7 +++++--
 meta/recipes-kernel/linux/linux-dummy.bb                   |  5 +++++
 .../make-mod-scripts/make-mod-scripts_1.0.bb               |  2 +-
 4 files changed, 21 insertions(+), 7 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/4 linux-dummy: Add do_compile_kernelmodules

Fixed:
PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"

$ bitbake world
ERROR: Task do_compile in make-mod-scripts_1.0.bb depends upon non-existent task do_compile_kernelmodules in linux-dummy.bb
ERROR: Command execution failed: Exited with 1
---
 meta/recipes-kernel/linux/linux-dummy.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta/recipes-kernel/linux/linux-dummy.bb +5 -0
index e1c7f76..62cf6f5 100644
@@ -39,6 +39,10 @@ do_compile () {
 	:
 }
 
+do_compile_kernelmodules() {
+    :
+}
+
 do_shared_workdir () {
 	:
 }
@@ -58,3 +62,4 @@ do_deploy() {
 addtask bundle_initramfs after do_install before do_deploy
 addtask deploy after do_install
 addtask shared_workdir after do_compile before do_install
+addtask compile_kernelmodules
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/4 make-mod-scripts: Depends on bison-native

In reply to Robert Yang

Fixed do_configure error when use linux-dummy:
PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"

/bin/sh: bison: command not found

Build make-mod-scripts doesn't make sense when use linux-dummy, but it breaks "bitbake world", so add bison-native to DEPENDS to fix the problem.

---
 meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb +1 -1
index 97c58c5..460e05a 100644
@@ -12,7 +12,7 @@ S = "${WORKDIR}"
 do_configure[depends] += "virtual/kernel:do_shared_workdir openssl-native:do_populate_sysroot"
 do_compile[depends] += "virtual/kernel:do_compile_kernelmodules"
 
-DEPENDS += "bc-native"
+DEPENDS += "bc-native bison-native"
 
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
 
Signature · 1 line
2.7.4
#3 lore raw

PATCH 3/4 update-alternatives.bbclass: run update-alternatives firstly in postinst script

In reply to Robert Yang

Recipes like postfix run command newaliases in postinst, but newaliases is installed newaliases.postfix, and need run update-alternatives to update it to newaliases, so we would get the error when install postinst on target.

Fixed:

$ opkg install postfix
Configuring postfix.
///var/lib/opkg/info/postfix.postinst: line 4: newaliases: command not found

Run update-alternatives firstly will fix the problem.

---
 meta/classes/update-alternatives.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/classes/update-alternatives.bbclass +5 -2
index b702e77..8c2b66e 100644
@@ -284,8 +284,11 @@ python populate_packages_updatealternatives () {
 
             bb.note('adding update-alternatives calls to postinst/prerm for %s' % pkg)
             bb.note('%s' % alt_setup_links)
-            postinst = d.getVar('pkg_postinst_%s' % pkg) or '#!/bin/sh\n'
-            postinst += alt_setup_links
+            postinst = d.getVar('pkg_postinst_%s' % pkg)
+            if postinst:
+                postinst = alt_setup_links + postinst
+            else:
+                postinst = '#!/bin/sh\n' + alt_setup_links
             d.setVar('pkg_postinst_%s' % pkg, postinst)
 
             bb.note('%s' % alt_remove_links)
Signature · 1 line
2.7.4
#4 lore raw

Re: [PATCH 3/4] update-alternatives.bbclass: run update-alternatives firstly in postinst script

Quoted 13 lines · Robert Yang

Recipes like postfix run command newaliases in postinst, but newaliases is
installed newaliases.postfix, and need run update-alternatives to update it to
newaliases, so we would get the error when install postinst on target.

Fixed:

$ opkg install postfix
Configuring postfix.
///var/lib/opkg/info/postfix.postinst: line 4: newaliases: command
not found
Quoted 6 lines

Run update-alternatives firstly will fix the problem.

---
 meta/classes/update-alternatives.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

This seemed to result in:

https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/724

Cheers,

Richard

#5 lore raw

Re: [PATCH 3/4] update-alternatives.bbclass: run update-alternatives firstly in postinst script

Hi,

I can reproduce it now, sorry about that, I'm working on it.

// Robert

Quoted 30 lines · Richard Purdie
Quoted 13 lines · Robert Yang

Recipes like postfix run command newaliases in postinst, but newaliases is
installed newaliases.postfix, and need run update-alternatives to update it to
newaliases, so we would get the error when install postinst on target.

Fixed:

$ opkg install postfix
Configuring postfix.
///var/lib/opkg/info/postfix.postinst: line 4: newaliases: command
not found
Quoted 6 lines

Run update-alternatives firstly will fix the problem.

---
  meta/classes/update-alternatives.bbclass | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)

This seemed to result in:

https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/724

Cheers,

Richard

#6 lore raw

PATCH 4/4 gtk-icon-cache.bbclass: Depends on gtk+3

In reply to Robert Yang

The gtk-update-icon-cache and gdk-pixbuf-query-loaders are provided by gtk+3.

---
 meta/classes/gtk-icon-cache.bbclass | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
meta/classes/gtk-icon-cache.bbclass +10 -4
index 66fe781..4e60fe6 100644
@@ -4,6 +4,11 @@ DEPENDS +=" ${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk
 
 PACKAGE_WRITE_DEPS += "gtk+3-native gdk-pixbuf-native"
 
+inherit distro_features_check
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+DEPENDS += "gtk+3"
+
 gtk_icon_cache_postinst() {
 if [ "x$D" != "x" ]; then
 	$INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} \
@@ -45,10 +50,11 @@ python populate_packages_append () {
         if not os.path.exists(icon_dir):
             continue
 
-        bb.note("adding hicolor-icon-theme dependency to %s" % pkg)
-        rdepends = ' ' + d.getVar('MLPREFIX', False) + "hicolor-icon-theme"
-        d.appendVar('RDEPENDS_%s' % pkg, rdepends)
-    
+        for dep in ('hicolor-icon-theme', 'gtk+3'):
+            bb.note("Adding %s dependency to %s" % (dep, pkg))
+            rdepends = ' ' + d.getVar('MLPREFIX', False) + dep
+            d.appendVar('RDEPENDS_%s' % pkg, rdepends)
+
         bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
         
         postinst = d.getVar('pkg_postinst_%s' % pkg)
Signature · 1 line
2.7.4
#7 lore raw

Re: [PATCH 4/4] gtk-icon-cache.bbclass: Depends on gtk+3

Quoted 1 line · Robert Yang

The gtk-update-icon-cache and gdk-pixbuf-query-loaders are provided by gtk+3.

gdk-pixbuf-query-loaders is provided by gdk-pixbuf, which is not tied to a specific GTK version.

gtk-update-icon-cache is provided by both GTK 2 and GTK 3, I haven't checked whether it will also be in GTK 4.

meta/classes/gtk-icon-cache.bbclass DEPENDS +=" ${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk · line 10

Quoted 12 lines

...

meta/classes/gtk-icon-cache.bbclass +4 -0
@@ -4,6 +4,11 @@ DEPENDS +=" ${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk
 
 PACKAGE_WRITE_DEPS += "gtk+3-native gdk-pixbuf-native"
 
+inherit distro_features_check
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+DEPENDS += "gtk+3"
...

This looks OK.

meta/classes/gtk-icon-cache.bbclass python populate_packages_append () { · line 56

Quoted 13 lines
meta/classes/gtk-icon-cache.bbclass +4 -4
@@ -45,10 +50,11 @@ python populate_packages_append () {
         if not os.path.exists(icon_dir):
             continue
 
-        bb.note("adding hicolor-icon-theme dependency to %s" % pkg)
-        rdepends = ' ' + d.getVar('MLPREFIX', False) + "hicolor-icon-theme"
-        d.appendVar('RDEPENDS_%s' % pkg, rdepends)
-    
+        for dep in ('hicolor-icon-theme', 'gtk+3'):
+            bb.note("Adding %s dependency to %s" % (dep, pkg))
+            rdepends = ' ' + d.getVar('MLPREFIX', False) + dep
+            d.appendVar('RDEPENDS_%s' % pkg, rdepends)
...

Why is this necessary?

I would expect there to always be a generated RDEPENDS on either gtk+ or gtk+3 (or soon gtk4) that already covers this. Anything I miss here?

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#8 lore raw

Re: [PATCH 4/4] gtk-icon-cache.bbclass: Depends on gtk+3

Quoted 8 lines · Adrian Bunk
Quoted 1 line · Robert Yang

The gtk-update-icon-cache and gdk-pixbuf-query-loaders are provided by gtk+3.

gdk-pixbuf-query-loaders is provided by gdk-pixbuf, which is not tied to a specific GTK version.

gtk-update-icon-cache is provided by both GTK 2 and GTK 3, I haven't checked whether it will also be in GTK 4.

Thanks, I will update it.

Quoted 20 lines

meta/classes/gtk-icon-cache.bbclass DEPENDS +=" ${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk · line 10

Quoted 13 lines

...

meta/classes/gtk-icon-cache.bbclass +4 -0
@@ -4,6 +4,11 @@ DEPENDS +=" ${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk
 
  PACKAGE_WRITE_DEPS += "gtk+3-native gdk-pixbuf-native"
 
+inherit distro_features_check
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+DEPENDS += "gtk+3"
...

This looks OK.

Quoted 4 lines
meta/classes/gtk-icon-cache.bbclass +0 -0
@@ -45,10 +50,11 @@ python populate_packages_append () {
          if not os.path.exists(icon_dir):
              continue
 
Quoted 11 lines

meta/classes/gtk-icon-cache.bbclass python populate_packages_append () { · line 56

Quoted 9 lines
meta/classes/gtk-icon-cache.bbclass +4 -4
-        bb.note("adding hicolor-icon-theme dependency to %s" % pkg)
-        rdepends = ' ' + d.getVar('MLPREFIX', False) + "hicolor-icon-theme"
-        d.appendVar('RDEPENDS_%s' % pkg, rdepends)
-
+        for dep in ('hicolor-icon-theme', 'gtk+3'):
+            bb.note("Adding %s dependency to %s" % (dep, pkg))
+            rdepends = ' ' + d.getVar('MLPREFIX', False) + dep
+            d.appendVar('RDEPENDS_%s' % pkg, rdepends)
...

Why is this necessary?

Otherwise, gtk+3 won't be installed.

Quoted 4 lines

I would expect there to always be a generated RDEPENDS on either gtk+ or gtk+3 (or soon gtk4) that already covers this. Anything I miss here?

gtk2/3/4 is a problem, I checked DEPENDS in oe-core's recipes, most of them depend on gtk+3, only one depends on gtk+:

meta/recipes-gnome/gnome/gnome-themes-standard_3.22.3.bb

Maybe gtk+2 is out of date? Since gtk+4 is on the way, so I think that we need something like virtual/gtk to fix these problems totally?

// Robert

Quoted 4 lines

cu
Adrian

#9 lore raw

Re: [PATCH 4/4] gtk-icon-cache.bbclass: Depends on gtk+3

Quoted 3 lines · Robert Yang

...
Maybe gtk+2 is out of date? Since gtk+4 is on the way, so I think that we need something like virtual/gtk to fix these problems totally?

GTK+2 is mostly obsolete.

I just checked the GTK4 sources, and there it is renamed to gtk4-update-icon-cache. Based on that I would say that your patch is actually fine at least for now.

Quoted 1 line

// Robert

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#10 lore raw

Re: [PATCH 4/4] gtk-icon-cache.bbclass: Depends on gtk+3

I’d say virtual/gtk wouldn’t be helpful much as 2/3/4 versions have major api differences.

Alex

Quoted 30 lines · Adrian Bunk
Quoted 5 lines · Robert Yang

...
Maybe gtk+2 is out of date? Since gtk+4 is on the way, so I think that we need something like virtual/gtk to fix these problems totally?

GTK+2 is mostly obsolete.

I just checked the GTK4 sources, and there it is renamed to gtk4-update-icon-cache. Based on that I would say that your patch is actually fine at least for now.

Quoted 1 line

// Robert

cu
Adrian

Signature · 10 lines
      "Is there not promise of rain?" Ling Tan asked suddenly out
       of the darkness. There had been need of rain for many days.
      "Only a promise," Lao Er said.
                                      Pearl S. Buck - Dragon Seed

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
#11 lore raw

Re: [PATCH 4/4] gtk-icon-cache.bbclass: Depends on gtk+3

In reply to Adrian Bunk
Quoted 10 lines · Adrian Bunk
Quoted 3 lines · Robert Yang

...
Maybe gtk+2 is out of date? Since gtk+4 is on the way, so I think that we need something like virtual/gtk to fix these problems totally?

GTK+2 is mostly obsolete.

I just checked the GTK4 sources, and there it is renamed to gtk4-update-icon-cache. Based on that I would say that your patch is actually fine at least for now.

Thanks, I updated the commit message in the PULL:

The gtk-update-icon-cache is provided by gtk+3, gdk-pixbuf-query-loaders is provided by gdk-pixbuf, and gtk+3 depends on gdk-pixbuf, so depends on gtk+3 can fix the problems.

// Robert

Quoted 6 lines
Quoted 2 lines

// Robert

cu
Adrian

#12 lore raw

Re: [PATCH 4/4] gtk-icon-cache.bbclass: Depends on gtk+3

Quoted 8 lines · Robert Yang
Quoted 6 lines · Adrian Bunk
Quoted 4 lines · Robert Yang

...
Maybe gtk+2 is out of date? Since gtk+4 is on the way, so I think that we
need something like virtual/gtk to fix these problems totally?

Quoted 7 lines
Quoted 5 lines

GTK+2 is mostly obsolete.

I just checked the GTK4 sources, and there it is renamed to gtk4-update-icon-cache. Based on that I would say that your patch is actually fine at least for now.

Thanks, I updated the commit message in the PULL:

Please resend patches rather than updating the branch as they get lost really easily and also don't get reviewed properly this way.

Cheers,

Richard

#13 lore raw

Re: [PATCH 4/4] gtk-icon-cache.bbclass: Depends on gtk+3

Why DEPENDS on gtk? The recipes will typically already do this, but all this class needs is the rdepends. Also, there's no explanation for the hicolor addition.

Ross

Quoted 30 lines · Richard Purdie
Quoted 8 lines · Robert Yang
Quoted 6 lines · Adrian Bunk
Quoted 4 lines · Robert Yang

...
Maybe gtk+2 is out of date? Since gtk+4 is on the way, so I think that we
need something like virtual/gtk to fix these problems totally?

Quoted 7 lines
Quoted 5 lines

GTK+2 is mostly obsolete.

I just checked the GTK4 sources, and there it is renamed to gtk4-update-icon-cache. Based on that I would say that your patch is actually fine at least for now.

Thanks, I updated the commit message in the PULL:

Please resend patches rather than updating the branch as they get lost really easily and also don't get reviewed properly this way.

Cheers,

Richard

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#14 lore raw

Re: [PATCH 4/4] gtk-icon-cache.bbclass: Depends on gtk+3

Hi Ross,

Quoted 3 lines · Ross

Why DEPENDS on gtk? The recipes will typically already do this, but all this class needs is the rdepends. Also, there's no explanation for the hicolor addition.

I got errors when running adwaita-icon-theme's postinst on target (command gtk-update-icon-cache not found), the recipe doesn't depend on gtk, and gtk-update-icon-cache is introduced by gtk-icon-cache.bbclass, so I think that we should add this DEPENDS in the bbclass? If only add gtk to RDEPENDS (no DEPENDS), there would be a warning like:

adwaita-icon-theme rdepends on gtk+3, but it isn't a build dependency?

For hicolor-icon-theme, it is an existed rdepends in gtk-icon-cache.bbclass, so I left it there.

// Robert

Quoted 36 lines

Ross

Quoted 30 lines · Richard Purdie
Quoted 8 lines · Robert Yang
Quoted 6 lines · Adrian Bunk
Quoted 4 lines · Robert Yang

...
Maybe gtk+2 is out of date? Since gtk+4 is on the way, so I think that we
need something like virtual/gtk to fix these problems totally?

Quoted 7 lines
Quoted 5 lines

GTK+2 is mostly obsolete.

I just checked the GTK4 sources, and there it is renamed to gtk4-update-icon-cache. Based on that I would say that your patch is actually fine at least for now.

Thanks, I updated the commit message in the PULL:

Please resend patches rather than updating the branch as they get lost really easily and also don't get reviewed properly this way.

Cheers,

Richard

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core