Hi Rebecca, On Monday, 24 July 2017 10:25:01 AM CEST Chang Rebecca Swee Fun 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 tinfoil while leaving > an option for users to enable them manually if needed. > > Signed-off-by: Chang Rebecca Swee Fun <[email protected]> > --- > scripts/lib/recipetool/create.py | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/ create.py > index 359eb9a..3885017 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) > @@ -440,6 +441,14 @@ def create_recipe(args): > srcrev = res.group(1) > srcuri = rev_re.sub('', srcuri) > > + 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. > + tinfoil.config_data.setVar('PREMIRRORS', '') > + tinfoil.config_data.setVar('MIRRORS', '')
I think we need to set these in the dummy recipe we're creating rather than through tinfoil.config_data, otherwise we'll break PREMIRRORS / MIRRORS needed to fetch other items if they've not already been fetched. Also, I'm not sure, but the above may trigger a reparse which we'd want to avoid as well. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
