From: Richard Purdie Date: Wed, 22 Nov 2023 09:35:01 +0000 (+0000) Subject: package_ipk: Fix Source: field variable dependency X-Git-Tag: yocto-5.2~4534 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3ea7da76c6930031a0071069027b1d71f737fbc9;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Richard Purdie --- diff --git a/meta/classes-global/package_ipk.bbclass b/meta/classes-global/package_ipk.bbclass index 1ca1308967c..71ffdd522ac 100644 --- a/meta/classes-global/package_ipk.bbclass +++ b/meta/classes-global/package_ipk.bbclass @@ -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)