path: root/scripts/lib/devtool/standard.py
diff options
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-04-28 14:23:31 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2016-05-30 10:18:24 +1200
commitafcecfbd2c40cc6fde80c5218db94902dd50866a (patch)
tree8891dd060086d15b99e44c7d4fe42439a9b1857b /scripts/lib/devtool/standard.py
parentbc34623687dfbf932402c899e044d867113b7138 (diff)
recipetool / devtool: set a fixed SRCREV by default when fetching from gitpaule/recipetool-fixes2-oe
If fetching source from a git repository, typically within OpenEmbedded we encourage setting SRCREV to a fixed revision, so change to do that by default and add a -a/--autorev option to use "${AUTOREV}" instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'scripts/lib/devtool/standard.py')
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 77a82d5590..3be32147ab 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -144,6 +144,8 @@ def add(args, config, basepath, workspace):
extracmdopts += ' --also-native'
if args.src_subdir:
extracmdopts += ' --src-subdir "%s"' % args.src_subdir
+ if args.autorev:
+ extracmdopts += ' -a'
tempdir = tempfile.mkdtemp(prefix='devtool')
@@ -1390,6 +1392,7 @@ def register_commands(subparsers, context):
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')
parser_add.add_argument('--version', '-V', help='Version to use within recipe (PV)')
parser_add.add_argument('--no-git', '-g', help='If fetching source, do not set up source tree as a git repository', action="store_true")
+ parser_add.add_argument('--autorev', '-a', help='When fetching from a git repository, set SRCREV in the recipe to a floating revision instead of fixed', action="store_true")
parser_add.add_argument('--binary', '-b', help='Treat the source tree as something that should be installed verbatim (no compilation, same directory structure). Useful with binary packages e.g. RPMs.', action='store_true')
parser_add.add_argument('--also-native', help='Also add native variant (i.e. support building recipe for the build host as well as the target machine)', action='store_true')
parser_add.add_argument('--src-subdir', help='Specify subdirectory within source tree to use', metavar='SUBDIR')