diff options
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-rw-r--r-- | scripts/lib/devtool/standard.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index b7f278f394..14e87b95a4 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
@@ -30,7 +30,7 @@ import errno | |||
30 | import glob | 30 | import glob |
31 | import filecmp | 31 | import filecmp |
32 | from collections import OrderedDict | 32 | from collections import OrderedDict |
33 | from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, recipe_to_append, get_bbclassextend_targets, DevtoolError | 33 | from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, recipe_to_append, get_bbclassextend_targets, update_unlockedsigs, DevtoolError |
34 | from devtool import parse_recipe | 34 | from devtool import parse_recipe |
35 | 35 | ||
36 | logger = logging.getLogger('devtool') | 36 | logger = logging.getLogger('devtool') |
@@ -407,7 +407,7 @@ def extract(args, config, basepath, workspace): | |||
407 | return 1 | 407 | return 1 |
408 | 408 | ||
409 | srctree = os.path.abspath(args.srctree) | 409 | srctree = os.path.abspath(args.srctree) |
410 | initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, config, rd, tinfoil) | 410 | initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil) |
411 | logger.info('Source tree extracted to %s' % srctree) | 411 | logger.info('Source tree extracted to %s' % srctree) |
412 | 412 | ||
413 | if initial_rev: | 413 | if initial_rev: |
@@ -431,7 +431,7 @@ def sync(args, config, basepath, workspace): | |||
431 | return 1 | 431 | return 1 |
432 | 432 | ||
433 | srctree = os.path.abspath(args.srctree) | 433 | srctree = os.path.abspath(args.srctree) |
434 | initial_rev = _extract_source(srctree, args.keep_temp, args.branch, True, config, rd, tinfoil) | 434 | initial_rev = _extract_source(srctree, args.keep_temp, args.branch, True, config, basepath, workspace, args.fixed_setup, rd, tinfoil) |
435 | logger.info('Source tree %s synchronized' % srctree) | 435 | logger.info('Source tree %s synchronized' % srctree) |
436 | 436 | ||
437 | if initial_rev: | 437 | if initial_rev: |
@@ -442,7 +442,7 @@ def sync(args, config, basepath, workspace): | |||
442 | tinfoil.shutdown() | 442 | tinfoil.shutdown() |
443 | 443 | ||
444 | 444 | ||
445 | def _extract_source(srctree, keep_temp, devbranch, sync, config, d, tinfoil): | 445 | def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, workspace, fixed_setup, d, tinfoil): |
446 | """Extract sources of a recipe""" | 446 | """Extract sources of a recipe""" |
447 | import oe.recipeutils | 447 | import oe.recipeutils |
448 | import oe.patch | 448 | import oe.patch |
@@ -711,7 +711,7 @@ def modify(args, config, basepath, workspace): | |||
711 | initial_rev = None | 711 | initial_rev = None |
712 | commits = [] | 712 | commits = [] |
713 | if not args.no_extract: | 713 | if not args.no_extract: |
714 | initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, config, rd, tinfoil) | 714 | initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil) |
715 | if not initial_rev: | 715 | if not initial_rev: |
716 | return 1 | 716 | return 1 |
717 | logger.info('Source tree extracted to %s' % srctree) | 717 | logger.info('Source tree extracted to %s' % srctree) |
@@ -773,6 +773,8 @@ def modify(args, config, basepath, workspace): | |||
773 | for commit in commits: | 773 | for commit in commits: |
774 | f.write('# commit: %s\n' % commit) | 774 | f.write('# commit: %s\n' % commit) |
775 | 775 | ||
776 | update_unlockedsigs(basepath, workspace, args.fixed_setup, [pn]) | ||
777 | |||
776 | _add_md5(config, pn, appendfile) | 778 | _add_md5(config, pn, appendfile) |
777 | 779 | ||
778 | logger.info('Recipe %s now set up to build from %s' % (pn, srctree)) | 780 | logger.info('Recipe %s now set up to build from %s' % (pn, srctree)) |
@@ -1802,7 +1804,7 @@ def register_commands(subparsers, context): | |||
1802 | group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true") | 1804 | group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true") |
1803 | parser_modify.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (when not using -n/--no-extract) (default "%(default)s")') | 1805 | parser_modify.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (when not using -n/--no-extract) (default "%(default)s")') |
1804 | parser_modify.add_argument('--keep-temp', help='Keep temporary directory (for debugging)', action="store_true") | 1806 | parser_modify.add_argument('--keep-temp', help='Keep temporary directory (for debugging)', action="store_true") |
1805 | parser_modify.set_defaults(func=modify) | 1807 | parser_modify.set_defaults(func=modify, fixed_setup=context.fixed_setup) |
1806 | 1808 | ||
1807 | parser_extract = subparsers.add_parser('extract', help='Extract the source for an existing recipe', | 1809 | parser_extract = subparsers.add_parser('extract', help='Extract the source for an existing recipe', |
1808 | description='Extracts the source for an existing recipe', | 1810 | description='Extracts the source for an existing recipe', |
@@ -1811,7 +1813,7 @@ def register_commands(subparsers, context): | |||
1811 | parser_extract.add_argument('srctree', help='Path to where to extract the source tree') | 1813 | parser_extract.add_argument('srctree', help='Path to where to extract the source tree') |
1812 | parser_extract.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (default "%(default)s")') | 1814 | parser_extract.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (default "%(default)s")') |
1813 | parser_extract.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') | 1815 | parser_extract.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') |
1814 | parser_extract.set_defaults(func=extract) | 1816 | parser_extract.set_defaults(func=extract, fixed_setup=context.fixed_setup) |
1815 | 1817 | ||
1816 | parser_sync = subparsers.add_parser('sync', help='Synchronize the source tree for an existing recipe', | 1818 | parser_sync = subparsers.add_parser('sync', help='Synchronize the source tree for an existing recipe', |
1817 | description='Synchronize the previously extracted source tree for an existing recipe', | 1819 | description='Synchronize the previously extracted source tree for an existing recipe', |
@@ -1821,7 +1823,7 @@ def register_commands(subparsers, context): | |||
1821 | parser_sync.add_argument('srctree', help='Path to the source tree') | 1823 | parser_sync.add_argument('srctree', help='Path to the source tree') |
1822 | parser_sync.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout') | 1824 | parser_sync.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout') |
1823 | parser_sync.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') | 1825 | parser_sync.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') |
1824 | parser_sync.set_defaults(func=sync) | 1826 | parser_sync.set_defaults(func=sync, fixed_setup=context.fixed_setup) |
1825 | 1827 | ||
1826 | parser_rename = subparsers.add_parser('rename', help='Rename a recipe file in the workspace', | 1828 | parser_rename = subparsers.add_parser('rename', help='Rename a recipe file in the workspace', |
1827 | description='Renames the recipe file for a recipe in the workspace, changing the name or version part or both, ensuring that all references within the workspace are updated at the same time. Only works when the recipe file itself is in the workspace, e.g. after devtool add. Particularly useful when devtool add did not automatically determine the correct name.', | 1829 | description='Renames the recipe file for a recipe in the workspace, changing the name or version part or both, ensuring that all references within the workspace are updated at the same time. Only works when the recipe file itself is in the workspace, e.g. after devtool add. Particularly useful when devtool add did not automatically determine the correct name.', |