@@ -104,7 +104,7 @@ def init_bb_cache(top_dir, settings, args):
d.setVar("__BBSRCREV_SEEN", "1")
if args.no_network:
d.setVar("BB_SRCREV_POLICY", "cache")
- bb.fetch.fetcher_init(d)
+ bb.fetch2.fetcher_init(d)
return d
def save_bb_cache():
@@ -181,14 +181,14 @@ def checkout_layers(layers, confdir, layerdir, d, rebase_conflicts_strategy='abo
remotes = _get_remotes(r_remote)
for remote in remotes:
- prot,host,path,user,pswd,params = bb.fetch.decodeurl(remote)
- fetchuri = bb.fetch.encodeurl(('git',host,path,user,pswd,params))
+ prot,host,path,user,pswd,params = bb.fetch2.decodeurl(remote)
+ fetchuri = bb.fetch2.encodeurl(('git',host,path,user,pswd,params))
logger.plain(" {}".format(r_name))
if branch:
src_uri = f"{fetchuri};protocol={prot};rev={rev};branch={branch};destsuffix={repodir}"
else:
src_uri = f"{fetchuri};protocol={prot};rev={rev};nobranch=1;destsuffix={repodir}"
- fetcher = bb.fetch.Fetch([src_uri], d)
+ fetcher = bb.fetch2.Fetch([src_uri], d)
repodir_path = os.path.join(layerdir, repodir)
try:
do_fetch(fetcher, layerdir)
@@ -909,12 +909,12 @@ def are_layers_changed(layers, layerdir, d):
remotes = _get_remotes(r_remote)
changed = False
for remote in remotes:
- type,host,path,user,pswd,params = bb.fetch.decodeurl(remote)
- fetchuri = bb.fetch.encodeurl(('git',host,path,user,pswd,params))
+ type,host,path,user,pswd,params = bb.fetch2.decodeurl(remote)
+ fetchuri = bb.fetch2.encodeurl(('git',host,path,user,pswd,params))
if branch:
- fetcher = bb.fetch.FetchData("{};protocol={};rev={};branch={};destsuffix={}".format(fetchuri,type,rev,branch,repodir), d)
+ fetcher = bb.fetch2.FetchData("{};protocol={};rev={};branch={};destsuffix={}".format(fetchuri,type,rev,branch,repodir), d)
else:
- fetcher = bb.fetch.FetchData("{};protocol={};rev={};nobranch=1;destsuffix={}".format(fetchuri,type,rev,repodir), d)
+ fetcher = bb.fetch2.FetchData("{};protocol={};rev={};nobranch=1;destsuffix={}".format(fetchuri,type,rev,repodir), d)
upstream_revision = fetcher.method.latest_revision(fetcher, d, 'default')
if upstream_revision != local_revision:
changed = True
@@ -995,7 +995,7 @@ def update_registry(registry, cachedir, d):
else:
full_registrydir = os.path.join(cachedir, registrydir)
logger.info("Fetching configuration registry\n {}\ninto\n {}".format(registry, full_registrydir))
- fetcher = bb.fetch.Fetch(["{};destsuffix={}".format(registry, registrydir)], d)
+ fetcher = bb.fetch2.Fetch(["{};destsuffix={}".format(registry, registrydir)], d)
do_fetch(fetcher, cachedir)
return full_registrydir
@@ -1105,7 +1105,7 @@ def install_buildtools(top_dir, settings, args, d):
logger.plain("Fetching buildtools installer using bitbake fetcher")
logger.plain(" {}".format(url))
- fetcher = bb.fetch.Fetch([src_uri], d)
+ fetcher = bb.fetch2.Fetch([src_uri], d)
try:
fetcher.download()
except bb.fetch2.ChecksumError as e: