]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_ipk: Use localdata store when signing packages
authorKenfe-Mickael Laventure <mickael.laventure@verkada.com>
Mon, 27 Sep 2021 16:45:45 +0000 (09:45 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Sep 2021 23:14:46 +0000 (00:14 +0100)
When signing a package, we were resolving the `PKGV` version using the
original data store (`d`). However, since that store does not have the
package name in its `OVERRIDES` list the wrong version can be returned in
recipes that produce multiple packages. One such example would be
`external-arm-toolchain.bb`.

The above issue is fixed by using `localdata` instead of `d` when
resolving the needed variables.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@verkada.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_ipk.bbclass

index 4fcb25ca707d9378d4ea2a0eb04850f64a10b75d..776fe8ed23b6a6859c023813f416e08c8423dd6c 100644 (file)
@@ -230,8 +230,8 @@ def ipk_write_pkg(pkg, d):
                                 shell=True)
 
         if d.getVar('IPK_SIGN_PACKAGES') == '1':
-            ipkver = "%s-%s" % (d.getVar('PKGV'), d.getVar('PKGR'))
-            ipk_to_sign = "%s/%s_%s_%s.ipk" % (pkgoutdir, pkgname, ipkver, d.getVar('PACKAGE_ARCH'))
+            ipkver = "%s-%s" % (localdata.getVar('PKGV'), localdata.getVar('PKGR'))
+            ipk_to_sign = "%s/%s_%s_%s.ipk" % (pkgoutdir, pkgname, ipkver, localdata.getVar('PACKAGE_ARCH'))
             sign_ipk(d, ipk_to_sign)
 
     finally: