]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate: only fetch remote signatures if verification is enabled
authorRoss Burton <ross.burton@intel.com>
Wed, 9 Sep 2015 12:35:05 +0000 (13:35 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 12 Sep 2015 21:47:11 +0000 (22:47 +0100)
Only fetch remote signatures if verification has been enabled, as otherwise the
fetcher throws errors that sstate.bbclass can't ignore.

[ YOCTO #8265 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/sstate.bbclass

index 77313bcfbcd7ee8655ba8393cdc6767953af05e1..50729bf75053c73c94b19a5447d2a551f2a91fdc 100644 (file)
@@ -615,9 +615,12 @@ def pstaging_fetch(sstatefetch, sstatepkg, d):
 
     # Try a fetch from the sstate mirror, if it fails just return and
     # we will build the package
-    for srcuri in ['file://{0}'.format(sstatefetch),
-                   'file://{0}.siginfo'.format(sstatefetch),
-                   'file://{0}.sig'.format(sstatefetch)]:
+    uris = ['file://{0}'.format(sstatefetch),
+            'file://{0}.siginfo'.format(sstatefetch)]
+    if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG", True), False):
+        uris += ['file://{0}.sig'.format(sstatefetch)]
+
+    for srcuri in uris:
         localdata.setVar('SRC_URI', srcuri)
         try:
             fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False)