Skip to contentSkip to conversation

sstate.bbclass: fix bb.fatal and too long line

PATCH New Robert Yang 1 participant 3 messages Oct 8, 2014

lore
Share & tools
lore
#0 lore raw

cover sstate.bbclass: fix bb.fatal and too long line

The following changes since commit 16cedc3bce6fc37543e9ef053cd7c589e523ca1c:

package_ipk.bbclass: Fix SRC_URI whitespace handling (2014-10-06 16:03:03 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/ss
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/ss

Robert Yang (2):
sstate.bbclass: the second bb.fatal not work
sstate.bbclass: split the too long line

 meta/classes/sstate.bbclass |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/2 sstate.bbclass: the second bb.fatal not work

The code:
bb.fatal("foo1")
bb.fatal("foo2")

Would make the second one not work, use bb.error for first one to fix the problem.

---
 meta/classes/sstate.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/sstate.bbclass +1 -1
index 403d6a0..f0f1731 100644
@@ -188,7 +188,7 @@ def sstate_install(ss, d):
                 if search_output != "":
                     match.append("Matched in %s" % search_output.rstrip())
     if match:
-        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)))
+        bb.error("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)))
         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.")
 
     # Write out the manifest
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/2 sstate.bbclass: split the too long line

In reply to Robert Yang

The too long line would cause "git send-email" report errors:
patch contains a line longer than 998 characters

Though we can use "--no-validate" to force the send.

---
 meta/classes/sstate.bbclass |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
meta/classes/sstate.bbclass +22 -1
index f0f1731..9cd4590 100644
@@ -188,7 +188,28 @@ def sstate_install(ss, d):
                 if search_output != "":
                     match.append("Matched in %s" % search_output.rstrip())
     if match:
-        bb.error("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)))
+        bb.error("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)))
         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.")
 
     # Write out the manifest
Signature · 1 line
1.7.9.5