]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
package_ipk: Fix Source: field variable dependency
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Nov 2023 09:35:01 +0000 (09:35 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 23 Nov 2023 12:11:57 +0000 (12:11 +0000)
The Source: variable is generated from FILE but this is excluded from checksums
normally which results in a reproduciubility issue when the filename changes.

Add in a dependency by reworking the code a little to avoid this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/package_ipk.bbclass

index 1ca1308967cd55d13b4446191216b83f9e2d938d..71ffdd522acfa71be642611f691892c4aa998a4f 100644 (file)
@@ -47,6 +47,10 @@ python do_package_ipk () {
 do_package_ipk[vardeps] += "ipk_write_pkg"
 do_package_ipk[vardepsexclude] = "BB_NUMBER_THREADS"
 
+# FILE isn't included by default but we want the recipe to change if basename() changes
+IPK_RECIPE_FILE = "${@os.path.basename(d.getVar('FILE'))}"
+IPK_RECIPE_FILE[vardepvalue] = "${IPK_RECIPE_FILE}"
+
 def ipk_write_pkg(pkg, d):
     import re, copy
     import subprocess
@@ -62,7 +66,7 @@ def ipk_write_pkg(pkg, d):
 
     outdir = d.getVar('PKGWRITEDIRIPK')
     pkgdest = d.getVar('PKGDEST')
-    recipesource = os.path.basename(d.getVar('FILE'))
+    recipesource = d.getVar('IPK_RECIPE_FILE')
 
     localdata = bb.data.createCopy(d)
     root = "%s/%s" % (pkgdest, pkg)