<div dir="ltr">Sorry, we&#39;re conflicting again.  Too many people working on the same bit of code!  Can you rebase this onto origin/master-next?<div><br></div><div>Ross</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 20 July 2017 at 11:31, Chang Rebecca Swee Fun <span dir="ltr">&lt;<a href="mailto:rebecca.swee.fun.chang@intel.com" target="_blank">rebecca.swee.fun.chang@intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When creating new recipes, we are almost certainly fetching a new<br>
source rather that something that has already been fetched. I have<br>
disable PREMIRRORS and MIRRORS settings from datastore while leaving<br>
an option for users to enable them manually if needed.<br>
<br>
Signed-off-by: Chang Rebecca Swee Fun &lt;<a href="mailto:rebecca.swee.fun.chang@intel.com">rebecca.swee.fun.chang@intel.<wbr>com</a>&gt;<br>
---<br>
 scripts/lib/recipetool/create.<wbr>py | 9 +++++++++<br>
 1 file changed, 9 insertions(+)<br>
<br>
diff --git a/scripts/lib/recipetool/<wbr>create.py b/scripts/lib/recipetool/<wbr>create.py<br>
index 8e63580..1015d02 100644<br>
--- a/scripts/lib/recipetool/<wbr>create.py<br>
+++ b/scripts/lib/recipetool/<wbr>create.py<br>
@@ -422,6 +422,7 @@ def create_recipe(args):<br>
     source = args.source<br>
     srcsubdir = &#39;&#39;<br>
     srcrev = &#39;${AUTOREV}&#39;<br>
+    mirrors = args.mirrors<br>
<br>
     if os.path.isfile(source):<br>
         source = &#39;file://%s&#39; % os.path.abspath(source)<br>
@@ -442,6 +443,13 @@ def create_recipe(args):<br>
         tempsrc = tempfile.mkdtemp(prefix=&#39;<wbr>recipetool-&#39;)<br>
         srctree = tempsrc<br>
         d = bb.data.createCopy(tinfoil.<wbr>config_data)<br>
+        if not mirrors:<br>
+            # We do not need PREMIRRORS since we are almost certainly<br>
+            # fetching new source rather than something that has already<br>
+            # been fetched. Hence, we disable them by default.<br>
+            # However, we provide an option for users to enable it.<br>
+            d.setVar(&#39;PREMIRRORS&#39;, &#39;&#39;)<br>
+            d.setVar(&#39;MIRRORS&#39;, &#39;&#39;)<br>
         if fetchuri.startswith(&#39;npm://&#39;):<br>
             # Check if npm is available<br>
             npm_bindir = check_npm(tinfoil, args.devtool)<br>
@@ -1180,6 +1188,7 @@ def register_commands(subparsers):<br>
     parser_create.add_argument(&#39;--<wbr>keep-temp&#39;, action=&quot;store_true&quot;, help=&#39;Keep temporary directory (for debugging)&#39;)<br>
     parser_create.add_argument(&#39;--<wbr>fetch-dev&#39;, action=&quot;store_true&quot;, help=&#39;For npm, also fetch devDependencies&#39;)<br>
     parser_create.add_argument(&#39;--<wbr>devtool&#39;, action=&quot;store_true&quot;, help=argparse.SUPPRESS)<br>
+    parser_create.add_argument(&#39;--<wbr>mirrors&#39;, action=&quot;store_true&quot;, help=&#39;Enable PREMIRRORS and MIRRORS for source tree fetching (disable by default).&#39;)<br>
     # FIXME I really hate having to set parserecipes for this, but given we may need<br>
     # to call into npm (and we don&#39;t know in advance if we will or not) and in order<br>
     # to do so we need to know npm&#39;s recipe sysroot path, there&#39;s not much alternative<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</font></span></blockquote></div><br></div>