summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/standard.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-rw-r--r--scripts/lib/devtool/standard.py30
1 files changed, 26 insertions, 4 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 261d642d4a..f7d8a82117 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -589,6 +589,16 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
589 else: 589 else:
590 task = 'do_patch' 590 task = 'do_patch'
591 591
592 if 'noexec' in (d.getVarFlags(task, False) or []) or 'task' not in (d.getVarFlags(task, False) or []):
593 logger.info('The %s recipe has %s disabled. Running only '
594 'do_configure task dependencies' % (pn, task))
595
596 if 'depends' in d.getVarFlags('do_configure', False):
597 pn = d.getVarFlags('do_configure', False)['depends']
598 pn = pn.replace('${PV}', d.getVar('PV'))
599 pn = pn.replace('${COMPILERDEP}', d.getVar('COMPILERDEP'))
600 task = None
601
592 # Run the fetch + unpack tasks 602 # Run the fetch + unpack tasks
593 res = tinfoil.build_targets(pn, 603 res = tinfoil.build_targets(pn,
594 task, 604 task,
@@ -600,6 +610,17 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
600 if not res: 610 if not res:
601 raise DevtoolError('Extracting source for %s failed' % pn) 611 raise DevtoolError('Extracting source for %s failed' % pn)
602 612
613 if not is_kernel_yocto and ('noexec' in (d.getVarFlags('do_patch', False) or []) or 'task' not in (d.getVarFlags('do_patch', False) or [])):
614 workshareddir = d.getVar('S')
615 if os.path.islink(srctree):
616 os.unlink(srctree)
617
618 os.symlink(workshareddir, srctree)
619
620 # The initial_rev file is created in devtool_post_unpack function that will not be executed if
621 # do_unpack/do_patch tasks are disabled so we have to directly say that source extraction was successful
622 return True, True
623
603 try: 624 try:
604 with open(os.path.join(tempdir, 'initial_rev'), 'r') as f: 625 with open(os.path.join(tempdir, 'initial_rev'), 'r') as f:
605 initial_rev = f.read() 626 initial_rev = f.read()
@@ -847,10 +868,11 @@ def modify(args, config, basepath, workspace):
847 if not initial_rev: 868 if not initial_rev:
848 return 1 869 return 1
849 logger.info('Source tree extracted to %s' % srctree) 870 logger.info('Source tree extracted to %s' % srctree)
850 # Get list of commits since this revision 871 if os.path.exists(os.path.join(srctree, '.git')):
851 (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_rev, cwd=srctree) 872 # Get list of commits since this revision
852 commits = stdout.split() 873 (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_rev, cwd=srctree)
853 check_commits = True 874 commits = stdout.split()
875 check_commits = True
854 else: 876 else:
855 if os.path.exists(os.path.join(srctree, '.git')): 877 if os.path.exists(os.path.join(srctree, '.git')):
856 # Check if it's a tree previously extracted by us. This is done 878 # Check if it's a tree previously extracted by us. This is done