Sure, no problem, rebase is in progress now. Rebecca
From: Burton, Ross [mailto:ross.bur...@intel.com] Sent: Friday, July 21, 2017 9:50 PM To: Chang, Rebecca Swee Fun <rebecca.swee.fun.ch...@intel.com> Cc: OpenEmbedded Core Mailing List <openembedded-core@lists.openembedded.org> Subject: Re: [OE-core] [PATCHv2 1/4] recipetool: create: disable PREMIRRORS and MIRRORS by default Sorry, we're conflicting again. Too many people working on the same bit of code! Can you rebase this onto origin/master-next? Ross On 20 July 2017 at 11:31, Chang Rebecca Swee Fun <rebecca.swee.fun.ch...@intel.com<mailto:rebecca.swee.fun.ch...@intel.com>> wrote: When creating new recipes, we are almost certainly fetching a new source rather that something that has already been fetched. I have disable PREMIRRORS and MIRRORS settings from datastore while leaving an option for users to enable them manually if needed. Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.ch...@intel.com<mailto:rebecca.swee.fun.ch...@intel.com>> --- scripts/lib/recipetool/create.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 8e63580..1015d02 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py @@ -422,6 +422,7 @@ def create_recipe(args): source = args.source srcsubdir = '' srcrev = '${AUTOREV}' + mirrors = args.mirrors if os.path.isfile(source): source = 'file://%s' % os.path.abspath(source) @@ -442,6 +443,13 @@ def create_recipe(args): tempsrc = tempfile.mkdtemp(prefix='recipetool-') srctree = tempsrc d = bb.data.createCopy(tinfoil.config_data) + if not mirrors: + # We do not need PREMIRRORS since we are almost certainly + # fetching new source rather than something that has already + # been fetched. Hence, we disable them by default. + # However, we provide an option for users to enable it. + d.setVar('PREMIRRORS', '') + d.setVar('MIRRORS', '') if fetchuri.startswith('npm://'): # Check if npm is available npm_bindir = check_npm(tinfoil, args.devtool) @@ -1180,6 +1188,7 @@ def register_commands(subparsers): parser_create.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') parser_create.add_argument('--fetch-dev', action="store_true", help='For npm, also fetch devDependencies') parser_create.add_argument('--devtool', action="store_true", help=argparse.SUPPRESS) + parser_create.add_argument('--mirrors', action="store_true", help='Enable PREMIRRORS and MIRRORS for source tree fetching (disable by default).') # FIXME I really hate having to set parserecipes for this, but given we may need # to call into npm (and we don't know in advance if we will or not) and in order # to do so we need to know npm's recipe sysroot path, there's not much alternative -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org<mailto:Openembedded-core@lists.openembedded.org> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core