summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-25 11:13:32 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-29 12:12:42 +0100
commit5cc591748e4f8ec3048137ea67fa75bf3b50cb20 (patch)
treeed68633a7e2a8f41bb1c896577207e9c884d7327 /meta/classes/sstate.bbclass
parente92e8009a1589d1e049eb7b34038d644ec872b82 (diff)
downloadpoky-5cc591748e4f8ec3048137ea67fa75bf3b50cb20.tar.gz
sstate: Change overlapping files warning to a fatal error
When files overlap in the sysroot, something bad usually happened. We've had two independent cases recently where a couple of months after one of these warnings was shown, builds failed due to corruption. This change moves the warning to become a fatal error. The complaint I've had about this is that we need to tell the user what happened and more importantly how to recover from it. If we could recover from it, great but the trouble is we simply don't know what happened. As a compromise, we can document several of the possible scenarios in the error message. We don't normally go to this level of detail however in this case, I'm lacking other viable alternatives. I do believe it is important to stop as corruption occurs rather than letting the build contunue into territory that is not deterministic amongst other things. The complex message is followed by a simpler one in case the long message is too much for the user. (From OE-Core rev: 179ac7de03977b6e440409eddb2166819e07286a) (From OE-Core rev: 4b503f25f1ef8f554d3c76d88399db379dc818cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 4057c8c833..72ac882dbb 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -187,7 +187,8 @@ def sstate_install(ss, d):
187 if search_output != "": 187 if search_output != "":
188 match.append("Matched in %s" % search_output.rstrip()) 188 match.append("Matched in %s" % search_output.rstrip())
189 if match: 189 if match:
190 bb.warn("The recipe %s is trying to install files into a shared area when those files already exist. Those files and their manifest location are:\n %s\nPlease verify which package should provide the above files." % (d.getVar('PN', True), "\n ".join(match))) 190 bb.fatal("The recipe %s is trying to install files into a shared area when those files already exist. Those files and their manifest location are:\n %s\nPlease verify which recipe should provide the above files.\nThe build has stopped as continuing in this scenario WILL break things, if not now, possibly in the future (we've seen builds fail several months later). If the system knew how to recover from this automatically it would however there are several different scenarios which can result in this and we don't know which one this is. It may be you have switched providers of something like virtual/kernel (e.g. from linux-yocto to linux-yocto-dev), in that case you need to execute the clean task for both recipes and it will resolve this error. It may be you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning those recipes should again resolve this error however switching DISTRO_FEATURES on an existing build directory is not supported, you should really clean out tmp and rebuild (reusing sstate should be safe). It could be the overlapping files detected are harmless in which case adding them to SSTATE_DUPWHITELIST may be the correct solution. It could also be your build is including two different conflicting versions of things (e.g. bluez 4 and bluez 5 and the correct solution for that would be to resolve the conflict. If in doubt, please ask on the mailing list, sharing the error and filelist above." % (d.getVar('PN', True), "\n ".join(match)))
191 bb.fatal("If the above message is too much, the simpler version is you're advised to wipe out tmp and rebuild (reusing sstate is fine). That will likely fix things in most (but not all) cases.")
191 192
192 # Write out the manifest 193 # Write out the manifest
193 f = open(manifest, "w") 194 f = open(manifest, "w")