package_ipk: Fix Source: field variable dependency

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.

(From OE-Core rev: 3ea7da76c6930031a0071069027b1d71f737fbc9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2023-11-22 09:35:01 +00:00
parent dde36b7b78
commit 18c5b54a95

View 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)