summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-07-07 11:57:10 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-12 23:10:04 +0100
commitb2ca2523cc9e51a4759b4420b07b0b67b3f5ac43 (patch)
tree4f546dbb2ad87854b9bce887b4e2485bc0e1fae1 /scripts
parentf9ac2c33c9a168f8b0fa2eca321f5377bad11fee (diff)
downloadopenembedded-core-b2ca2523cc9e51a4759b4420b07b0b67b3f5ac43.tar.gz
openembedded-core-b2ca2523cc9e51a4759b4420b07b0b67b3f5ac43.tar.bz2
openembedded-core-b2ca2523cc9e51a4759b4420b07b0b67b3f5ac43.zip
devtool: update-recipe: fix --initial-rev option
In OE-Core revision 7baf57ad896112cf2258b3e2c2a1f8b756fb39bc I changed the default update-recipe behaviour to only update patches for commits that were changed; unfortunately I failed to handle the --initial-rev option which was broken after that point. Rework how the initial revision is passed in so that it now operates correctly. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/standard.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index ed49a936b9..e2f4f8fca3 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -811,22 +811,19 @@ def modify(args, config, basepath, workspace):
return 0
-def _get_patchset_revs(args, srctree, recipe_path):
+def _get_patchset_revs(srctree, recipe_path, initial_rev=None):
"""Get initial and update rev of a recipe. These are the start point of the
whole patchset and start point for the patches to be re-generated/updated.
"""
import bb
- if args.initial_rev:
- return args.initial_rev, args.initial_rev
-
- # Parse initial rev from recipe
+ # Parse initial rev from recipe if not specified
commits = []
- initial_rev = None
with open(recipe_path, 'r') as f:
for line in f:
if line.startswith('# initial_rev:'):
- initial_rev = line.split(':')[-1].strip()
+ if not initial_rev:
+ initial_rev = line.split(':')[-1].strip()
elif line.startswith('# commit:'):
commits.append(line.split(':')[-1].strip())
@@ -1125,7 +1122,7 @@ def _update_recipe_patch(args, config, workspace, srctree, rd, config_data):
raise DevtoolError('unable to find workspace bbappend for recipe %s' %
args.recipename)
- initial_rev, update_rev, changed_revs = _get_patchset_revs(args, srctree, append)
+ initial_rev, update_rev, changed_revs = _get_patchset_revs(srctree, append, args.initial_rev)
if not initial_rev:
raise DevtoolError('Unable to find initial revision - please specify '
'it with --initial-rev')