<div dir="ltr">Sorry, we'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"><<a href="mailto:rebecca.swee.fun.chang@intel.com" target="_blank">rebecca.swee.fun.chang@intel.com</a>></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 <<a href="mailto:rebecca.swee.fun.chang@intel.com">rebecca.swee.fun.chang@intel.<wbr>com</a>><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 = ''<br>
srcrev = '${AUTOREV}'<br>
+ mirrors = args.mirrors<br>
<br>
if os.path.isfile(source):<br>
source = 'file://%s' % os.path.abspath(source)<br>
@@ -442,6 +443,13 @@ def create_recipe(args):<br>
tempsrc = tempfile.mkdtemp(prefix='<wbr>recipetool-')<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('PREMIRRORS', '')<br>
+ d.setVar('MIRRORS', '')<br>
if fetchuri.startswith('npm://'):<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('--<wbr>keep-temp', action="store_true", help='Keep temporary directory (for debugging)')<br>
parser_create.add_argument('--<wbr>fetch-dev', action="store_true", help='For npm, also fetch devDependencies')<br>
parser_create.add_argument('--<wbr>devtool', action="store_true", help=argparse.SUPPRESS)<br>
+ parser_create.add_argument('--<wbr>mirrors', action="store_true", help='Enable PREMIRRORS and MIRRORS for source tree fetching (disable by default).')<br>
# FIXME I really hate having to set parserecipes for this, but given we may need<br>
# to call into npm (and we don't know in advance if we will or not) and in order<br>
# to do so we need to know npm's recipe sysroot path, there'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>