summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-12-22 15:19:59 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-09 13:39:11 +0000
commit976373be1216c8e610718de4e8023a5ca73f40c7 (patch)
tree7a9b9940ac79b8aadf27bee14394ea3de46b7f97 /meta/classes/sstate.bbclass
parent3d6c667e5455c2333dedd7a9b5040c51b0ccdd8f (diff)
downloadpoky-976373be1216c8e610718de4e8023a5ca73f40c7.tar.gz
classes/sstate: fix file conflict message
* Fix not decoding output from grep ("Matched in b'manifest...') * Fix showing "Matched in b''" if no match (show "not matched to any task" instead) * Drop the filtering out of .populate-sysroot from matched manifest names - it should have been .populate_sysroot so it doesn't work, and in any case the value of removing the task name is questionable given that we aren't removing it for any other task, and that the rest of the filename isn't only the task name, we might as well have the whole thing. At least then you can do a find on that exact name without wildcards and find it. * Fix indenting of file list entries and indent "matched in" further underneath * Minor punctuation fixes (From OE-Core rev: 4675ce43496898fccbac738835d7e92b1cca648e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass22
1 files changed, 12 insertions, 10 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 755bf590c4..afdb4a32d0 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -213,25 +213,27 @@ def sstate_install(ss, d):
213 break 213 break
214 if realmatch: 214 if realmatch:
215 match.append(f) 215 match.append(f)
216 sstate_search_cmd = "grep -rlF '%s' %s --exclude=master.list | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'" % (f, d.expand("${SSTATE_MANIFESTS}")) 216 sstate_search_cmd = "grep -rlF '%s' %s --exclude=master.list | sed -e 's:^.*/::'" % (f, d.expand("${SSTATE_MANIFESTS}"))
217 search_output = subprocess.Popen(sstate_search_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0] 217 search_output = subprocess.Popen(sstate_search_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0]
218 if search_output != "": 218 if search_output:
219 match.append("Matched in %s" % search_output.rstrip()) 219 match.append(" (matched in %s)" % search_output.decode('utf-8').rstrip())
220 else:
221 match.append(" (not matched to any task)")
220 if match: 222 if match:
221 bb.error("The recipe %s is trying to install files into a shared " \ 223 bb.error("The recipe %s is trying to install files into a shared " \
222 "area when those files already exist. Those files and their manifest " \ 224 "area when those files already exist. Those files and their manifest " \
223 "location are:\n %s\nPlease verify which recipe should provide the " \ 225 "location are:\n %s\nPlease verify which recipe should provide the " \
224 "above files.\nThe build has stopped as continuing in this scenario WILL " \ 226 "above files.\n\nThe build has stopped, as continuing in this scenario WILL " \
225 "break things, if not now, possibly in the future (we've seen builds fail " \ 227 "break things - if not now, possibly in the future (we've seen builds fail " \
226 "several months later). If the system knew how to recover from this " \ 228 "several months later). If the system knew how to recover from this " \
227 "automatically it would however there are several different scenarios " \ 229 "automatically it would, however there are several different scenarios " \
228 "which can result in this and we don't know which one this is. It may be " \ 230 "which can result in this and we don't know which one this is. It may be " \
229 "you have switched providers of something like virtual/kernel (e.g. from " \ 231 "you have switched providers of something like virtual/kernel (e.g. from " \
230 "linux-yocto to linux-yocto-dev), in that case you need to execute the " \ 232 "linux-yocto to linux-yocto-dev), in that case you need to execute the " \
231 "clean task for both recipes and it will resolve this error. It may be " \ 233 "clean task for both recipes and it will resolve this error. It may be " \
232 "you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning " \ 234 "you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning " \
233 "those recipes should again resolve this error however switching " \ 235 "those recipes should again resolve this error, however switching " \
234 "DISTRO_FEATURES on an existing build directory is not supported, you " \ 236 "DISTRO_FEATURES on an existing build directory is not supported - you " \
235 "should really clean out tmp and rebuild (reusing sstate should be safe). " \ 237 "should really clean out tmp and rebuild (reusing sstate should be safe). " \
236 "It could be the overlapping files detected are harmless in which case " \ 238 "It could be the overlapping files detected are harmless in which case " \
237 "adding them to SSTATE_DUPWHITELIST may be the correct solution. It could " \ 239 "adding them to SSTATE_DUPWHITELIST may be the correct solution. It could " \
@@ -239,7 +241,7 @@ def sstate_install(ss, d):
239 "things (e.g. bluez 4 and bluez 5 and the correct solution for that would " \ 241 "things (e.g. bluez 4 and bluez 5 and the correct solution for that would " \
240 "be to resolve the conflict. If in doubt, please ask on the mailing list, " \ 242 "be to resolve the conflict. If in doubt, please ask on the mailing list, " \
241 "sharing the error and filelist above." % \ 243 "sharing the error and filelist above." % \
242 (d.getVar('PN'), "\n ".join(match))) 244 (d.getVar('PN'), "\n ".join(match)))
243 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.") 245 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.")
244 246
245 # Write out the manifest 247 # Write out the manifest