* [PATCH] staging: remove files from multilib workdir
@ 2018-02-28 10:20 Raphael Freudiger
2018-02-28 10:32 ` ✗ patchtest: failure for " Patchwork
0 siblings, 1 reply; 2+ messages in thread
From: Raphael Freudiger @ 2018-02-28 10:20 UTC (permalink / raw)
To: openembedded-core
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.
Signed-off-by: Raphael Freudiger <raphael.freudiger@siemens.com>
---
meta/classes/staging.bbclass | 47 ++++++++++++++++++++++++++++++++------------
1 file changed, 34 insertions(+), 13 deletions(-)
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 984051d6aa..2e836adce4 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -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"):
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* ✗ patchtest: failure for staging: remove files from multilib workdir
2018-02-28 10:20 [PATCH] staging: remove files from multilib workdir Raphael Freudiger
@ 2018-02-28 10:32 ` Patchwork
0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2018-02-28 10:32 UTC (permalink / raw)
To: Raphael Freudiger; +Cc: openembedded-core
== 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 (openembedded-core@lists.openembedded.org) 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-28 10:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-28 10:20 [PATCH] staging: remove files from multilib workdir Raphael Freudiger
2018-02-28 10:32 ` ✗ patchtest: failure for " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox