diff options
Diffstat (limited to 'scripts/lib/devtool/standard.py')
| -rw-r--r-- | scripts/lib/devtool/standard.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 166862f12f..5ac678b3b1 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
| @@ -409,7 +409,7 @@ def extract(args, config, basepath, workspace): | |||
| 409 | return 1 | 409 | return 1 |
| 410 | 410 | ||
| 411 | srctree = os.path.abspath(args.srctree) | 411 | srctree = os.path.abspath(args.srctree) |
| 412 | initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil) | 412 | initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil) |
| 413 | logger.info('Source tree extracted to %s' % srctree) | 413 | logger.info('Source tree extracted to %s' % srctree) |
| 414 | 414 | ||
| 415 | if initial_rev: | 415 | if initial_rev: |
| @@ -433,7 +433,7 @@ def sync(args, config, basepath, workspace): | |||
| 433 | return 1 | 433 | return 1 |
| 434 | 434 | ||
| 435 | srctree = os.path.abspath(args.srctree) | 435 | srctree = os.path.abspath(args.srctree) |
| 436 | initial_rev = _extract_source(srctree, args.keep_temp, args.branch, True, config, basepath, workspace, args.fixed_setup, rd, tinfoil) | 436 | initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, True, config, basepath, workspace, args.fixed_setup, rd, tinfoil) |
| 437 | logger.info('Source tree %s synchronized' % srctree) | 437 | logger.info('Source tree %s synchronized' % srctree) |
| 438 | 438 | ||
| 439 | if initial_rev: | 439 | if initial_rev: |
| @@ -549,6 +549,7 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works | |||
| 549 | 549 | ||
| 550 | with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f: | 550 | with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f: |
| 551 | srcsubdir = f.read() | 551 | srcsubdir = f.read() |
| 552 | srcsubdir_rel = os.path.relpath(srcsubdir, os.path.join(tempdir, 'workdir')) | ||
| 552 | 553 | ||
| 553 | tempdir_localdir = os.path.join(tempdir, 'oe-local-files') | 554 | tempdir_localdir = os.path.join(tempdir, 'oe-local-files') |
| 554 | srctree_localdir = os.path.join(srctree, 'oe-local-files') | 555 | srctree_localdir = os.path.join(srctree, 'oe-local-files') |
| @@ -615,7 +616,7 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works | |||
| 615 | logger.info('Preserving temporary directory %s' % tempdir) | 616 | logger.info('Preserving temporary directory %s' % tempdir) |
| 616 | else: | 617 | else: |
| 617 | shutil.rmtree(tempdir) | 618 | shutil.rmtree(tempdir) |
| 618 | return initial_rev | 619 | return initial_rev, srcsubdir_rel |
| 619 | 620 | ||
| 620 | def _add_md5(config, recipename, filename): | 621 | def _add_md5(config, recipename, filename): |
| 621 | """Record checksum of a file (or recursively for a directory) to the md5-file of the workspace""" | 622 | """Record checksum of a file (or recursively for a directory) to the md5-file of the workspace""" |
| @@ -713,7 +714,7 @@ def modify(args, config, basepath, workspace): | |||
| 713 | initial_rev = None | 714 | initial_rev = None |
| 714 | commits = [] | 715 | commits = [] |
| 715 | if not args.no_extract: | 716 | if not args.no_extract: |
| 716 | initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil) | 717 | initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil) |
| 717 | if not initial_rev: | 718 | if not initial_rev: |
| 718 | return 1 | 719 | return 1 |
| 719 | logger.info('Source tree extracted to %s' % srctree) | 720 | logger.info('Source tree extracted to %s' % srctree) |
