Skip to contentSkip to conversation

meta: 4 fixes

PATCH New Robert Yang 1 participant 5 messages Feb 19, 2016

lore
Share & tools
lore
#0 lore raw

cover meta: 4 fixes

The following changes since commit 58b45240739da210ef2fecea931c8b8daa9a4c07:

epiphany: Add libxml2-native to DEPENDS (2016-02-18 22:55:12 +0000)

are available in the git repository at:

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

Robert Yang (4):
image.bbclass: fix circular dependency when IMAGE_FSTYPES append
hddimg
recipe_sanity.bbclass: skip DataSmart in recipe_sanity_eh() terminal.bbclass: import oe.terminal for oe.terminal.prioritized() staging.bbclass: remove trail slash from SYSROOT_DESTDIR

 meta/classes/image-live.bbclass    |   11 ++++++++++-
 meta/classes/recipe_sanity.bbclass |    5 ++---
 meta/classes/staging.bbclass       |    2 +-
 meta/classes/terminal.bbclass      |    6 ++++--
 4 files changed, 17 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/4 image.bbclass: fix circular dependency when IMAGE_FSTYPES append hddimg

Fixed:
IMAGE_FSTYPES_append = " hddimg"

$ bitbake -g core-image-minimal-initramfs
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing RunQueue
ERROR: Task /path/to/core-image-minimal-initramfs.bb (do_bootimg) has circular dependency on /path/to/core-image-minimal-initramfs.bb (do_image_complete)
ERROR: Command execution failed: Exited with 1

This is because IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}", and if IMAGE_FSTYPES append hddimg, then core-image-minimal-initramfs.bb would be circular dependency:
do_bootimg -> do_image_complete -> do_bootimg.

Now we check and error out.

---
 meta/classes/image-live.bbclass |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
meta/classes/image-live.bbclass +10 -1
index aafa7d5..d2314aa 100644
@@ -9,7 +9,6 @@ LABELS_append = " ${SYSLINUX_LABELS} "
 
 ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
 
-do_bootimg[depends] += "${INITRD_IMAGE}:do_image_complete"
 do_bootimg[depends] += "${PN}:do_image_ext4"
 
 inherit bootimg
@@ -18,3 +17,13 @@ IMAGE_TYPEDEP_live = "ext4"
 IMAGE_TYPEDEP_iso = "ext4"
 IMAGE_TYPEDEP_hddimg = "ext4"
 IMAGE_TYPES_MASKED += "live hddimg iso"
+
+python() {
+    image_b = d.getVar('IMAGE_BASENAME', True)
+    initrd_i = d.getVar('INITRD_IMAGE', True)
+    if image_b == initrd_i:
+        bb.error('INITRD_IMAGE %s cannot use image live, hddimg or iso.' % initrd_i)
+        bb.fatal('Check IMAGE_FSTYPES and INITRAMFS_FSTYPES settings.')
+    else:
+        d.appendVarFlag('do_bootimg', 'depends', ' %s:do_image_complete' % initrd_i)
+}
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/4 recipe_sanity.bbclass: skip DataSmart in recipe_sanity_eh()

In reply to Robert Yang

Fixed:

$ bitbake quilt -crecipe_sanity
  File "/path/to/poky/bitbake/lib/bb/siggen.py", line 261, in dump_sigtask
    p = pickle.dump(data, stream, -1)
PicklingError: Can't pickle <COWDict Level: 1 Current Keys: 0>:
attribute lookup bb.COW.C failed

This is because of:
cfgdata[k] = d.getVar(k, 0)

If d.getVar(k, 0) is a DataSmart (for example, BB_ORIGENV), it won't have the attribute of bb.COW.C, so the error happend.

---
 meta/classes/recipe_sanity.bbclass |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
meta/classes/recipe_sanity.bbclass +2 -3
index ee04e33..295611f 100644
@@ -143,9 +143,8 @@ python recipe_sanity_eh () {
 
     cfgdata = {}
     for k in d.keys():
-    #for k in ["S", "PR", "PV", "PN", "DESCRIPTION", "LICENSE", "DEPENDS",
-    #          "SECTION"]:
-        cfgdata[k] = d.getVar(k, 0)
+        if not isinstance(d.getVar(k, 0), bb.data_smart.DataSmart):
+            cfgdata[k] = d.getVar(k, 0)
 
     d.setVar("__recipe_sanity_cfgdata", cfgdata)
     #d.setVar("__recipe_sanity_cfgdata", d)
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 3/4 terminal.bbclass: import oe.terminal for oe.terminal.prioritized()

In reply to Robert Yang

Fixed:
INHERIT += "typecheck"

$ bitbake -p
ERROR: Failure expanding expression auto none ${@" ".join(o.name for o in oe.terminal.prioritized())}
which triggered exception AttributeError: 'module' object has no attribute 'terminal'
---
 meta/classes/terminal.bbclass |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/classes/terminal.bbclass +4 -2
index fd87cfe..9f4c24e 100644
@@ -1,8 +1,7 @@
 OE_TERMINAL ?= 'auto'
 OE_TERMINAL[type] = 'choice'
 OE_TERMINAL[choices] = 'auto none \
-                        ${@" ".join(o.name \
-                                    for o in oe.terminal.prioritized())}'
+                        ${@oe_terminal_prioritized()}'
 
 OE_TERMINAL_EXPORTS += 'EXTRA_OEMAKE'
 OE_TERMINAL_EXPORTS[type] = 'list'
@@ -10,6 +9,9 @@ OE_TERMINAL_EXPORTS[type] = 'list'
 XAUTHORITY ?= "${HOME}/.Xauthority"
 SHELL ?= "bash"
 
+def oe_terminal_prioritized():
+    import oe.terminal
+    return " ".join(o.name for o in oe.terminal.prioritized())
 
 def emit_terminal_func(command, envdata, d):
     cmd_func = 'do_terminal'
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 4/4 staging.bbclass: remove trail slash from SYSROOT_DESTDIR

In reply to Robert Yang

Fixed path:
QA Issue: <foo> sysroot-destdir//usr/lib/ <foo>

Note the 2 slashes "//".

---
 meta/classes/staging.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/staging.bbclass +1 -1
index 243bcdf..bc5dfa8 100644
@@ -161,7 +161,7 @@ do_populate_sysroot[umask] = "022"
 addtask populate_sysroot after do_install
 
 SYSROOT_PREPROCESS_FUNCS ?= ""
-SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir/"
+SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir"
 SYSROOT_LOCK = "${STAGING_DIR}/staging.lock"
 
 # We clean out any existing sstate from the sysroot if we rerun configure
Signature · 1 line
1.7.9.5