Skip to contentSkip to conversation

devtool sdk-update: unconditionally append updateserver to sstate mirrors

PATCH New Jaewon Lee 1 participant 1 message Mar 14, 2019

lore
Share & tools
lore

Jaewon Lee

author
#0 lore raw

PATCH 1/1 devtool sdk-update: unconditionally append updateserver to sstate mirrors

The code in sdk.py which checks if SSTATE_MIRRORS is set before appending the updateserver to SSTATE_MIRRORS was written before it was being set in the eSDK's local.conf (OE-Core commit 6b9e8b780dcd8d5ffba3df35cfe41674413ee26d). Unconditionally appending updateserver to SSTATE_MIRRORS as this is pretty safe to do.

[YOCTO #12884]

---
 scripts/lib/devtool/sdk.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
scripts/lib/devtool/sdk.py +3 -4
index 4616753797..37f2af3f5c 100644
@@ -214,10 +214,9 @@ def sdk_update(args, config, basepath, workspace):
             shutil.rmtree(os.path.join(basepath, 'downloads', 'uninative'))
             shutil.move(os.path.join(tmpsdk_dir, 'downloads', 'uninative'), os.path.join(basepath, 'downloads'))
 
-        if not sstate_mirrors:
-            with open(os.path.join(conf_dir, 'site.conf'), 'a') as f:
-                f.write('SCONF_VERSION = "%s"\n' % site_conf_version)
-                f.write('SSTATE_MIRRORS_append = " file://.* %s/sstate-cache/PATH \\n "\n' % updateserver)
+        with open(os.path.join(conf_dir, 'site.conf'), 'a') as f:
+            f.write('SCONF_VERSION = "%s"\n' % site_conf_version)
+            f.write('SSTATE_MIRRORS_append = " file://.* %s/sstate-cache/PATH \\n "\n' % updateserver)
     finally:
         shutil.rmtree(tmpsdk_dir)
 
Signature · 1 line
2.18.1