Skip to contentSkip to conversation

TypeError in self.pm.handle_bad_recommendations

PATCH New Martin Jansa 1 participant 2 messages Feb 19, 2014

lore
Share & tools
lore
#0 lore raw

With latest oe-core/master I get this exception when building my images:

ERROR: Error executing a python function in /OE/recipes-core/images/my-image.bb:

The stack trace of python calls that resulted in this exception/failure was:
File: 'do_rootfs', lineno: 17, function: <module>

     0013:    # generate final images
     0014:    create_image(d)
     0015:
     0016:
 *** 0017:do_rootfs(d)
     0018:

File: 'do_rootfs', lineno: 11, function: do_rootfs
0007: # generate the initial manifest
0008: create_manifest(d)
0009:
0010: # generate rootfs
*** 0011: create_rootfs(d)

     0012:
     0013:    # generate final images
     0014:    create_image(d)
     0015:
File: '/OE/oe-core/meta/lib/oe/rootfs.py', lineno: 594, function: create_rootfs
     0590:    img_type = d.getVar('IMAGE_PKGTYPE', True)
     0591:    if img_type == "rpm":
                                                                                                                                            733560,1      99%
     0590:    img_type = d.getVar('IMAGE_PKGTYPE', True)
     0591:    if img_type == "rpm":
     0592:        RpmRootfs(d, manifest_dir).create()
     0593:    elif img_type == "ipk":
 *** 0594:        OpkgRootfs(d, manifest_dir).create()
     0595:    elif img_type == "deb":
     0596:        DpkgRootfs(d, manifest_dir).create()
     0597:
     0598:    os.environ.clear()

File: '/OE/oe-core/meta/lib/oe/rootfs.py', lineno: 88, function: create
0084:
0085: execute_pre_post_process(self.d, pre_process_cmds)
0086:
0087: # call the package manager dependent create method
*** 0088: self._create()

     0089:
     0090:        sysconfdir = self.image_rootfs + self.d.getVar('sysconfdir', True)
     0091:        bb.utils.mkdirhier(sysconfdir)
     0092:        with open(sysconfdir + "/version", "w+") as ver:
File: '/OE/oe-core/meta/lib/oe/rootfs.py', lineno: 525, function: _create
     0521:        execute_pre_post_process(self.d, opkg_pre_process_cmds)
     0522:
     0523:        self.pm.update()
     0524:

*** 0525: self.pm.handle_bad_recommendations()
0526:
0527: for pkg_type in self.install_order:
0528: if pkg_type in pkgs_to_install:
0529: # For multilib, we perform a sanity test before final install
File: '/OE/oe-core/meta/lib/oe/package_manager.py', lineno: 1169, function: handle_bad_recommendations
1165: "returned %d:\n%s" % (pkg_info, e.returncode, e.output))
1166:
1167: if output == "":
1168: bb.note("Requested ignored recommendation $i is "
*** 1169: "not a package" % pkg)
1170: continue
1171:
1172: for line in output.split('\n'):
1173: if line.startswith("Status:"):
Exception: TypeError: not all arguments converted during string formatting

ERROR: Function failed: do_rootfs

bitbake -e shows these bad recommendations:
BAD_RECOMMENDATIONS=" update-rc.d openssh kernel-vmlinux"

Complete bitbake -e history:

# $BAD_RECOMMENDATIONS [6 operations]
# append /OE/meta-webos/conf/distro/include/webos-preferred-providers.inc:26
# "update-rc.d"
# _append[qemux86] /OE/meta-webos/conf/distro/include/webos-preferred-providers.inc:31
# " kernel-vmlinux"
# append /OE/meta-webos/conf/distro/include/webos.inc:34
# "openssh"
# set /OE/oe-core/meta/conf/documentation.conf:69
# [doc] "A list of packages not to install despite being recommended by a recipe. Support for this variable exists only when using the IPK packaging backend."
# set? conf/bitbake.conf:743
# ""
# set data_smart.py:429 [finalize]
# " update-rc.d openssh kernel-vmlinux"
# computed:
# " update-rc.d openssh kernel-vmlinux"
BAD_RECOMMENDATIONS=" update-rc.d openssh kernel-vmlinux"

sigh.. and now I see the issue.. patch coming

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#1 lore raw

PATCH 1/1 package_manager.py: Fix $i -> %s in bb.note

* change the text a bit, because I have trouble parsing two verbs at the beginning of sentence.

---
 meta/lib/oe/package_manager.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/package_manager.py +1 -1
index 6dc8fbd..0b376b7 100644
@@ -1165,7 +1165,7 @@ class OpkgPM(PackageManager):
                              "returned %d:\n%s" % (pkg_info, e.returncode, e.output))
 
                 if output == "":
-                    bb.note("Requested ignored recommendation $i is "
+                    bb.note("Ignored bad recommendation: '%s' is "
                             "not a package" % pkg)
                     continue
 
Signature · 1 line
1.8.5.3