summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-01-20 07:29:17 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-20 11:53:49 +0000
commite9d3b7dc75caa80d8ce9d6a4b8e71d3c496a0592 (patch)
tree2c2ee0491dc95effd8f7d0811e2a6e7fccffef23 /meta/classes
parent785bec81ef75878749bd3a7a355bbd6aab16a198 (diff)
downloadpoky-e9d3b7dc75caa80d8ce9d6a4b8e71d3c496a0592.tar.gz
Revert "classes/sstate: add a mode to error if sstate package unavailable"
It turns out that this check cannot work. We don't have the information to know whether an sstate package is really needed at this point in the execution, so we check the availability for things that we won't actually end up needing later on. Thus we can't fail if some of these aren't found or we'll get needless failures. This check was intended to give earlier more accurate errors when sstate artifacts failed to download, but that's not practical so we'll rely solely on the task execution check that was added within the runqueue. This reverts most of commit 9e711b54487c3141d7264b8cf0d74f9465020190 (we still need to allow BB_SETSCENE_ENFORCE through from the external environment since the eSDK relies upon that.) (From OE-Core rev: ff29ac6901d04487312f554d9e62250a18729c6c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sstate.bbclass23
1 files changed, 0 insertions, 23 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 34069c7801..b56e95a768 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -739,7 +739,6 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
739 739
740 ret = [] 740 ret = []
741 missed = [] 741 missed = []
742 missing = []
743 extension = ".tgz" 742 extension = ".tgz"
744 if siginfo: 743 if siginfo:
745 extension = extension + ".siginfo" 744 extension = extension + ".siginfo"
@@ -761,18 +760,6 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
761 760
762 return spec, extrapath, tname 761 return spec, extrapath, tname
763 762
764 def sstate_pkg_to_pn(pkg, d):
765 """
766 Translate an sstate filename to a PN value by way of SSTATE_PKGSPEC. This is slightly hacky but
767 we don't have access to everything in this context.
768 """
769 pkgspec = d.getVar('SSTATE_PKGSPEC', False)
770 try:
771 idx = pkgspec.split(':').index('${PN}')
772 except ValueError:
773 bb.fatal('Unable to find ${PN} in SSTATE_PKGSPEC')
774 return pkg.split(':')[idx]
775
776 763
777 for task in range(len(sq_fn)): 764 for task in range(len(sq_fn)):
778 765
@@ -807,8 +794,6 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
807 if localdata.getVar('BB_NO_NETWORK') == "1" and localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK') == "1": 794 if localdata.getVar('BB_NO_NETWORK') == "1" and localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK') == "1":
808 localdata.delVar('BB_NO_NETWORK') 795 localdata.delVar('BB_NO_NETWORK')
809 796
810 whitelist = bb.runqueue.get_setscene_enforce_whitelist(d)
811
812 from bb.fetch2 import FetchConnectionCache 797 from bb.fetch2 import FetchConnectionCache
813 def checkstatus_init(thread_worker): 798 def checkstatus_init(thread_worker):
814 thread_worker.connection_cache = FetchConnectionCache() 799 thread_worker.connection_cache = FetchConnectionCache()
@@ -835,12 +820,6 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
835 except: 820 except:
836 missed.append(task) 821 missed.append(task)
837 bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri) 822 bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
838 if whitelist:
839 pn = sstate_pkg_to_pn(sstatefile, d)
840 taskname = sq_task[task]
841 if not bb.runqueue.check_setscene_enforce_whitelist(pn, taskname, whitelist):
842 missing.append(task)
843 bb.error('Sstate artifact unavailable for %s.%s' % (pn, taskname))
844 pass 823 pass
845 bb.event.fire(bb.event.ProcessProgress("Checking sstate mirror object availability", len(tasklist) - thread_worker.tasks.qsize()), d) 824 bb.event.fire(bb.event.ProcessProgress("Checking sstate mirror object availability", len(tasklist) - thread_worker.tasks.qsize()), d)
846 825
@@ -868,8 +847,6 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
868 bb.event.disable_threadlock() 847 bb.event.disable_threadlock()
869 848
870 bb.event.fire(bb.event.ProcessFinished("Checking sstate mirror object availability"), d) 849 bb.event.fire(bb.event.ProcessFinished("Checking sstate mirror object availability"), d)
871 if whitelist and missing:
872 bb.fatal('Required artifacts were unavailable - exiting')
873 850
874 inheritlist = d.getVar("INHERIT") 851 inheritlist = d.getVar("INHERIT")
875 if "toaster" in inheritlist: 852 if "toaster" in inheritlist: