summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorJean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>2020-01-24 18:07:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-27 16:48:09 +0000
commit3a8a675825a40fd0ac6bcc7bfff4713dac4910e7 (patch)
tree66f7ab4d8a883c532e727b5e9e5e5ad08933559a /scripts/lib
parent4662963b2c26b1b8008ea591bbbf5840f0695a6a (diff)
downloadpoky-3a8a675825a40fd0ac6bcc7bfff4713dac4910e7.tar.gz
devtool: npm: rename npm command line options
This commit renames the '--fetch-dev' option into '--npm-dev' as it is a npm only option. (From OE-Core rev: 2b75cc848ceebee4067788a621299bfd5fb62231) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/devtool/standard.py6
-rw-r--r--scripts/lib/recipetool/create.py8
2 files changed, 6 insertions, 8 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 1c0cd8ab51..f33018de3f 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -145,8 +145,8 @@ def add(args, config, basepath, workspace):
145 extracmdopts += ' --src-subdir "%s"' % args.src_subdir 145 extracmdopts += ' --src-subdir "%s"' % args.src_subdir
146 if args.autorev: 146 if args.autorev:
147 extracmdopts += ' -a' 147 extracmdopts += ' -a'
148 if args.fetch_dev: 148 if args.npm_dev:
149 extracmdopts += ' --fetch-dev' 149 extracmdopts += ' --npm-dev'
150 if args.mirrors: 150 if args.mirrors:
151 extracmdopts += ' --mirrors' 151 extracmdopts += ' --mirrors'
152 if args.srcrev: 152 if args.srcrev:
@@ -2197,7 +2197,7 @@ def register_commands(subparsers, context):
2197 group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true") 2197 group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
2198 group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true") 2198 group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true")
2199 parser_add.add_argument('--fetch', '-f', help='Fetch the specified URI and extract it to create the source tree (deprecated - pass as positional argument instead)', metavar='URI') 2199 parser_add.add_argument('--fetch', '-f', help='Fetch the specified URI and extract it to create the source tree (deprecated - pass as positional argument instead)', metavar='URI')
2200 parser_add.add_argument('--fetch-dev', help='For npm, also fetch devDependencies', action="store_true") 2200 parser_add.add_argument('--npm-dev', help='For npm, also fetch devDependencies', action="store_true")
2201 parser_add.add_argument('--version', '-V', help='Version to use within recipe (PV)') 2201 parser_add.add_argument('--version', '-V', help='Version to use within recipe (PV)')
2202 parser_add.add_argument('--no-git', '-g', help='If fetching source, do not set up source tree as a git repository', action="store_true") 2202 parser_add.add_argument('--no-git', '-g', help='If fetching source, do not set up source tree as a git repository', action="store_true")
2203 group = parser_add.add_mutually_exclusive_group() 2203 group = parser_add.add_mutually_exclusive_group()
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 4c4bbadb4c..7659862f58 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -714,10 +714,8 @@ def create_recipe(args):
714 lines_after.append('INSANE_SKIP_${PN} += "already-stripped"') 714 lines_after.append('INSANE_SKIP_${PN} += "already-stripped"')
715 lines_after.append('') 715 lines_after.append('')
716 716
717 if args.fetch_dev: 717 if args.npm_dev:
718 extravalues['fetchdev'] = True 718 extravalues['NPM_INSTALL_DEV'] = 1
719 else:
720 extravalues['fetchdev'] = None
721 719
722 # Find all plugins that want to register handlers 720 # Find all plugins that want to register handlers
723 logger.debug('Loading recipe handlers') 721 logger.debug('Loading recipe handlers')
@@ -1313,7 +1311,7 @@ def register_commands(subparsers):
1313 group.add_argument('-S', '--srcrev', help='Source revision to fetch if fetching from an SCM such as git (default latest)') 1311 group.add_argument('-S', '--srcrev', help='Source revision to fetch if fetching from an SCM such as git (default latest)')
1314 parser_create.add_argument('-B', '--srcbranch', help='Branch in source repository if fetching from an SCM such as git (default master)') 1312 parser_create.add_argument('-B', '--srcbranch', help='Branch in source repository if fetching from an SCM such as git (default master)')
1315 parser_create.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') 1313 parser_create.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
1316 parser_create.add_argument('--fetch-dev', action="store_true", help='For npm, also fetch devDependencies') 1314 parser_create.add_argument('--npm-dev', action="store_true", help='For npm, also fetch devDependencies')
1317 parser_create.add_argument('--devtool', action="store_true", help=argparse.SUPPRESS) 1315 parser_create.add_argument('--devtool', action="store_true", help=argparse.SUPPRESS)
1318 parser_create.add_argument('--mirrors', action="store_true", help='Enable PREMIRRORS and MIRRORS for source tree fetching (disabled by default).') 1316 parser_create.add_argument('--mirrors', action="store_true", help='Enable PREMIRRORS and MIRRORS for source tree fetching (disabled by default).')
1319 parser_create.set_defaults(func=create_recipe) 1317 parser_create.set_defaults(func=create_recipe)