Lines Matching refs:srctree
36 if not args.recipename and not args.srctree and not args.fetch and not args.fetchuri:
48 elif scriptutils.is_src_url(args.srctree):
52 args.fetchuri = args.srctree
53 args.srctree = ''
54 elif args.recipename and not args.srctree:
56 args.srctree = args.recipename
67 if args.srctree and os.path.isfile(args.srctree):
68 args.fetchuri = 'file://' + os.path.abspath(args.srctree)
69 args.srctree = ''
86 if args.srctree:
87 srctree = os.path.abspath(args.srctree)
91 srctree = None
96 if srctree and os.path.exists(srctree):
98 if not os.path.isdir(srctree):
101 srctree)
102 elif os.listdir(srctree):
105 srctree)
107 if args.srctree:
109 args.srctree)
110 elif srctree:
114 "URI to fetch source from" % srctree)
130 if srctree:
131 extracmdopts += ' -x %s' % srctree
135 source = srctree
184 srctree = os.path.join(srctreeparent, recipename)
186 if os.path.exists(srctree):
187 if os.path.isdir(srctree):
189 os.rmdir(srctree)
192 … raise DevtoolError('Source tree path %s already exists and is not empty' % srctree)
196 … raise DevtoolError('Source tree path %s already exists and is not a directory' % srctree)
197 logger.info('Using default source tree path %s' % srctree)
198 shutil.move(tmpsrcdir, srctree)
235 setup_git_repo(srctree, args.version, 'devtool', d=tinfoil.config_data)
238 if os.path.exists(os.path.join(srctree, '.git')):
239 (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree)
243 srctree = os.path.join(srctree, args.src_subdir)
248 f.write('EXTERNALSRC = "%s"\n' % srctree)
252 f.write('EXTERNALSRC_BUILD = "%s"\n' % srctree)
383 def _git_exclude_path(srctree, path): argument
392 git_files = list(_git_ls_tree(srctree, 'HEAD', recurse).keys())
421 srctree = os.path.abspath(args.srctree)
422 …initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, wo…
423 logger.info('Source tree extracted to %s' % srctree)
445 srctree = os.path.abspath(args.srctree)
446 …initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, True, config, basepath, wor…
447 logger.info('Source tree %s synchronized' % srctree)
456 def symlink_oelocal_files_srctree(rd,srctree): argument
461 local_files_dir = os.path.join(srctree, 'oe-local-files')
466 bb.utils.mkdirhier(os.path.join(srctree, relpth))
470 destpth = os.path.join(srctree, relpth, fn)
480 bb.process.run('git add %s' % ' '.join(addfiles), cwd=srctree)
483 …ymlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree)
486 def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, workspace, fixed_setup, … argument
497 if not os.path.exists(srctree):
498 raise DevtoolError("output path %s does not exist" % srctree)
500 if os.path.exists(srctree):
501 if not os.path.isdir(srctree):
503 srctree)
504 elif os.listdir(srctree):
506 "non-empty" % srctree)
514 bb.utils.mkdirhier(srctree)
515 os.rmdir(srctree)
617 if os.path.islink(srctree):
618 os.unlink(srctree)
620 os.symlink(workshareddir, srctree)
654 srctree_localdir = os.path.join(srctree, 'oe-local-files')
657 … bb.process.run('git fetch file://' + srcsubdir + ' ' + devbranch + ':' + devbranch, cwd=srctree)
680 shutil.move(srcsubdir, srctree)
681 symlink_oelocal_files_srctree(d,srctree)
685 shutil.copy2(os.path.join(tempdir, '.config'), srctree)
768 def get_real_srctree(srctree, s, workdir): argument
775 srctree = os.path.join(srctree, srcsubdir)
776 return srctree
802 if args.srctree:
803 srctree = os.path.abspath(args.srctree)
805 srctree = get_default_srctree(config, pn)
807 if args.no_extract and not os.path.isdir(srctree):
810 srctree)
835 oe.path.copyhardlinktree(srcdir,srctree)
838 localfilesdir = os.path.join(srctree,'oe-local-files')
860 … _move_file(os.path.join(workdir, fname), os.path.join(srctree, 'oe-local-files', fname))
861 with open(os.path.join(srctree, 'oe-local-files', '.gitignore'), 'w') as f:
864 symlink_oelocal_files_srctree(rd,srctree)
872 shutil.copy2(os.path.join(kconfpath, '.config'),srctree)
879 …initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, wo…
882 logger.info('Source tree extracted to %s' % srctree)
883 if os.path.exists(os.path.join(srctree, '.git')):
885 … (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_rev, cwd=srctree)
889 if os.path.exists(os.path.join(srctree, '.git')):
895 (stdout, _) = bb.process.run('git branch --contains devtool-base', cwd=srctree)
896 bb.process.run('git rev-parse %s' % args.branch, cwd=srctree)
903 (stdout, _) = bb.process.run('git rev-parse devtool-base', cwd=srctree)
907 (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree)
913 (stdout, _) = bb.process.run('git branch', cwd=srctree)
925 (stdout, _) = bb.process.run('git log devtool-base..%s' % branch, cwd=srctree)
935 srctreebase = srctree
936 srctree = get_real_srctree(srctree, rd.getVar('S'), rd.getVar('WORKDIR'))
949 f.write('EXTERNALSRC:pn-%s = "%s"\n' % (pn, srctree))
953 f.write('EXTERNALSRC_BUILD:pn-%s = "%s"\n' % (pn, srctree))
989 logger.info('Recipe %s now set up to build from %s' % (pn, srctree))
1106 srctree = workspace[args.recipename]['srctree']
1107 … if os.path.abspath(srctree) == os.path.join(config.workspace_path, 'sources', args.recipename):
1109 logger.info('Renaming %s to %s' % (srctree, newsrctree))
1110 shutil.move(srctree, newsrctree)
1119 if srctree in line:
1120 line = line.replace(srctree, newsrctree)
1189 def _get_patchset_revs(srctree, recipe_path, initial_rev=None, force_patch_refresh=False): argument
1197 cwd=srctree)
1218 initial_rev, cwd=srctree)
1226 cwd=srctree)
1293 def _export_patches(srctree, rd, start_rev, destdir, changed_revs=None): argument
1313 patch_pathspec = _git_exclude_path(srctree, 'oe-local-files')
1314 GitApplyTree.extractPatches(srctree, start_rev, destdir, patch_pathspec)
1365 def _create_kconfig_diff(srctree, rd, outfile): argument
1368 orig_config = os.path.join(srctree, '.config.baseline')
1369 new_config = os.path.join(srctree, '.config.new')
1392 def _export_local_files(srctree, rd, destdir, srctreebase): argument
1419 cwd=srctree)
1425 git_files = _git_ls_tree(srctree)
1429 tmp_index = os.path.join(srctree, '.git', 'index.tmp.devtool')
1431 bb.process.run(['git', 'checkout', tree, '--', '.'], cwd=srctree,
1434 new_set = list(_git_ls_tree(srctree, tree, True).keys())
1447 if _create_kconfig_diff(srctree, rd, fragment_path):
1496 fpath = os.path.join(srctree, os.path.relpath(fworkpath, s))
1518 def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_… argument
1531 stdout, _ = bb.process.run('git rev-parse HEAD', cwd=srctree)
1534 (srctree, err))
1551 upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir, srctreebase)
1556 upd_p, new_p, del_p = _export_patches(srctree, rd, old_srcrev,
1613 def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_r… argument
1625 relpatchdir = os.path.relpath(srctreebase, srctree)
1638 …initial_rev, update_rev, changed_revs, filter_patches = _get_patchset_revs(srctree, append, initia…
1653 upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir, srctreebase)
1657 upd_p, new_p, _ = _export_patches(srctree, rd, update_rev,
1661 _, _, del_p = _export_patches(srctree, rd, initial_rev,
1762 def _guess_recipe_update_mode(srctree, rdata): argument
1774 stdout, _ = bb.process.run('git rev-parse HEAD', cwd=srctree)
1777 cwd=srctree)
1785 srctree = workspace[recipename]['srctree']
1787 mode = _guess_recipe_update_mode(srctree, rd)
1793 stdout, _ = bb.process.run('git branch', cwd=srctree)
1822 bb.process.run('git checkout %s' % mainbranch, cwd=srctree)
1832 bb.process.run('git checkout %s' % branch, cwd=srctree)
1836 …updated, appendf, removed = _update_recipe_srcrev(recipename, workspace, srctree, crd, appendlayer…
1838 …updated, appendf, removed = _update_recipe_patch(recipename, workspace, srctree, crd, appendlayerd…
1848 bb.process.run('git checkout %s' % startbranch, cwd=srctree)
2059 srctree = workspace[args.recipename]['srctree']
2060 check_git_repo_op(srctree, [corebasedir])
2061 dirty = check_git_repo_dirty(srctree)