staging: remove files from multilib workdir
PATCH 1/1 staging: remove files from multilib workdir
Packages with a different architecture will be installed in a different multilib workdir. When those packages are updated, it will remove the files from the default workdir, but not from the multilib workdir.
This will throw a file exists error later on.
Remove the files from the multilib workdir for packages that are installed into the multilib workdir.
--- meta/classes/staging.bbclass | 47 ++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 13 deletions(-)
meta/classes/staging.bbclass +34 -13
@@ -470,6 +470,10 @@ python extend_recipe_sysroot() { multilibs = {} manifests = {} + multilib_variants = (d.getVar("MULTILIBS") or "").split() + if multilib_variants: + multilib_variants = [variant.split(":")[1] for variant in multilib_variants] + for f in os.listdir(depdir): if not f.endswith(".complete"): continue
@@ -477,7 +481,15 @@ python extend_recipe_sysroot() { if os.path.islink(f) and not os.path.exists(f): bb.note("%s no longer exists, removing from sysroot" % f) lnk = os.readlink(f.replace(".complete", "")) - sstate_clean_manifest(depdir + "/" + lnk, d, workdir) + dep = os.path.basename(f).replace(".complete", "") + d2 = d + for variant in multilib_variants: + if dep.startswith(variant+"-"): + if variant not in multilibs: + multilibs[variant] = get_multilib_datastore(variant, d) + d2 = multilibs[variant] + break + sstate_clean_manifest(depdir + "/" + lnk, d2, d2.getVar("WORKDIR")) os.unlink(f) os.unlink(f.replace(".complete", ""))
@@ -517,7 +529,14 @@ python extend_recipe_sysroot() { fl = depdir + "/" + l bb.note("Task %s no longer depends on %s, removing from sysroot" % (mytaskname, l)) lnk = os.readlink(fl) - sstate_clean_manifest(depdir + "/" + lnk, d, workdir) + d2 = d + for variant in multilib_variants: + if l.startswith(variant+"-"): + if variant not in multilibs: + multilibs[variant] = get_multilib_datastore(variant, d) + d2 = multilibs[variant] + break + sstate_clean_manifest(depdir + "/" + lnk, d2, d2.getVar("WORKDIR")) os.unlink(fl) os.unlink(fl + ".complete")
@@ -528,6 +547,18 @@ python extend_recipe_sysroot() { taskhash = setscenedeps[dep][5] taskmanifest = depdir + "/" + c + "." + taskhash + d2 = d + destsysroot = recipesysroot + variant = '' + # get multilib datastore if needed + if setscenedeps[dep][2].startswith("virtual:multilib"): + variant = setscenedeps[dep][2].split(":")[2] + if variant != current_variant: + if variant not in multilibs: + multilibs[variant] = get_multilib_datastore(variant, d) + d2 = multilibs[variant] + destsysroot = d2.getVar("RECIPE_SYSROOT") + if os.path.exists(depdir + "/" + c): lnk = os.readlink(depdir + "/" + c) if lnk == c + "." + taskhash and os.path.exists(depdir + "/" + c + ".complete"):
@@ -535,7 +566,7 @@ python extend_recipe_sysroot() { continue else: bb.note("%s exists in sysroot, but is stale (%s vs. %s), removing." % (c, lnk, c + "." + taskhash)) - sstate_clean_manifest(depdir + "/" + lnk, d, workdir) + sstate_clean_manifest(depdir + "/" + lnk, d2, d2.getVar("WORKDIR")) os.unlink(depdir + "/" + c) if os.path.lexists(depdir + "/" + c + ".complete"): os.unlink(depdir + "/" + c + ".complete")
@@ -544,16 +575,6 @@ python extend_recipe_sysroot() { os.symlink(c + "." + taskhash, depdir + "/" + c) - d2 = d - destsysroot = recipesysroot - variant = '' - if setscenedeps[dep][2].startswith("virtual:multilib"): - variant = setscenedeps[dep][2].split(":")[2] - if variant != current_variant: - if variant not in multilibs: - multilibs[variant] = get_multilib_datastore(variant, d) - d2 = multilibs[variant] - destsysroot = d2.getVar("RECIPE_SYSROOT") native = False if c.endswith("-native"):
Signature · 1 line
2.11.0
✗ patchtest: failure for staging: remove files from multilib workdir
== Series Details ==
Series: staging: remove files from multilib workdir
Revision: 1
URL : https://patchwork.openembedded.org/series/11134/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at b30153a157)
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe