diff options
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-rw-r--r-- | scripts/lib/devtool/standard.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index c254132423..96b271c2d6 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
@@ -94,6 +94,8 @@ def add(args, config, basepath, workspace): | |||
94 | source = srctree | 94 | source = srctree |
95 | if args.version: | 95 | if args.version: |
96 | extracmdopts += ' -V %s' % args.version | 96 | extracmdopts += ' -V %s' % args.version |
97 | if args.binary: | ||
98 | extracmdopts += ' -b' | ||
97 | try: | 99 | try: |
98 | stdout, _ = exec_build_env_command(config.init_path, basepath, 'recipetool --color=%s create -o %s "%s" %s' % (color, recipefile, source, extracmdopts)) | 100 | stdout, _ = exec_build_env_command(config.init_path, basepath, 'recipetool --color=%s create -o %s "%s" %s' % (color, recipefile, source, extracmdopts)) |
99 | except bb.process.ExecutionError as e: | 101 | except bb.process.ExecutionError as e: |
@@ -125,6 +127,12 @@ def add(args, config, basepath, workspace): | |||
125 | if initial_rev: | 127 | if initial_rev: |
126 | f.write('\n# initial_rev: %s\n' % initial_rev) | 128 | f.write('\n# initial_rev: %s\n' % initial_rev) |
127 | 129 | ||
130 | if args.binary: | ||
131 | f.write('do_install_append() {\n') | ||
132 | f.write(' rm -rf ${D}/.git\n') | ||
133 | f.write(' rm -f ${D}/singletask.lock\n') | ||
134 | f.write('}\n') | ||
135 | |||
128 | _add_md5(config, args.recipename, appendfile) | 136 | _add_md5(config, args.recipename, appendfile) |
129 | 137 | ||
130 | logger.info('Recipe %s has been automatically created; further editing may be required to make it fully functional' % recipefile) | 138 | logger.info('Recipe %s has been automatically created; further editing may be required to make it fully functional' % recipefile) |
@@ -885,6 +893,7 @@ def register_commands(subparsers, context): | |||
885 | parser_add.add_argument('--fetch', '-f', help='Fetch the specified URI and extract it to create the source tree', metavar='URI') | 893 | parser_add.add_argument('--fetch', '-f', help='Fetch the specified URI and extract it to create the source tree', metavar='URI') |
886 | parser_add.add_argument('--version', '-V', help='Version to use within recipe (PV)') | 894 | parser_add.add_argument('--version', '-V', help='Version to use within recipe (PV)') |
887 | parser_add.add_argument('--no-git', '-g', help='If -f/--fetch is specified, do not set up source tree as a git repository', action="store_true") | 895 | parser_add.add_argument('--no-git', '-g', help='If -f/--fetch is specified, do not set up source tree as a git repository', action="store_true") |
896 | parser_add.add_argument('--binary', '-b', help='Treat the source tree as something that should be installed verbatim (no compilation, same directory structure)', action='store_true') | ||
888 | parser_add.set_defaults(func=add) | 897 | parser_add.set_defaults(func=add) |
889 | 898 | ||
890 | parser_modify = subparsers.add_parser('modify', help='Modify the source for an existing recipe', | 899 | parser_modify = subparsers.add_parser('modify', help='Modify the source for an existing recipe', |