]> 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)
committerAnuj Mittal <anuj.mittal@intel.com>
Mon, 4 Oct 2021 02:46:18 +0000 (10:46 +0800)
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>
(cherry picked from commit 2b5f01cf5a92a873ac4c3f0ba0584cab2cc05714)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
meta/classes/package_ipk.bbclass

index 600b3ac90ce273557b37c4535ec357c8ee842241..67d6007e11ca06bfd05e838449f73ce5251d6d0a 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: