summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-04-27 10:53:20 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-28 09:44:14 +0100
commitf1d3b5f1859f0bf411ed05e0695c813b3ed96305 (patch)
tree02365c4228d8241e16ff5f28f385d51e3ab04f91 /scripts/lib
parentd1b6e1dfdbd0f77bc21863471db39816cfc3c3be (diff)
downloadpoky-f1d3b5f1859f0bf411ed05e0695c813b3ed96305.tar.gz
devtool: update-recipe: handle unversioned bbappends
Use the proper bbappend file name, don't just assume it will have a version suffix (because it won't if the original recipe doesn't). Fixes [YOCTO #7651]. (From OE-Core master rev: 3332d68ef7b2a300ce8dcf5021497d98e5b17baa) (From OE-Core rev: 3d5ea16a1f53c12d86c4e8df6af864964541cf02) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/devtool/standard.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 893226578a..0142fe0d62 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -427,12 +427,6 @@ def update_recipe(args, config, basepath, workspace):
427 logger.error("no recipe named %s in your workspace" % args.recipename) 427 logger.error("no recipe named %s in your workspace" % args.recipename)
428 return -1 428 return -1
429 429
430 # Get initial revision from bbappend
431 appends = glob.glob(os.path.join(config.workspace_path, 'appends', '%s_*.bbappend' % args.recipename))
432 if not appends:
433 logger.error('unable to find workspace bbappend for recipe %s' % args.recipename)
434 return -1
435
436 tinfoil = setup_tinfoil() 430 tinfoil = setup_tinfoil()
437 import bb 431 import bb
438 from oe.patch import GitApplyTree 432 from oe.patch import GitApplyTree
@@ -443,6 +437,12 @@ def update_recipe(args, config, basepath, workspace):
443 return -1 437 return -1
444 recipefile = rd.getVar('FILE', True) 438 recipefile = rd.getVar('FILE', True)
445 439
440 # Get initial revision from bbappend
441 append = os.path.join(config.workspace_path, 'appends', '%s.bbappend' % os.path.splitext(os.path.basename(recipefile))[0])
442 if not os.path.exists(append):
443 logger.error('unable to find workspace bbappend for recipe %s' % args.recipename)
444 return -1
445
446 orig_src_uri = rd.getVar('SRC_URI', False) or '' 446 orig_src_uri = rd.getVar('SRC_URI', False) or ''
447 if args.mode == 'auto': 447 if args.mode == 'auto':
448 if 'git://' in orig_src_uri: 448 if 'git://' in orig_src_uri:
@@ -513,7 +513,7 @@ def update_recipe(args, config, basepath, workspace):
513 initial_rev = args.initial_rev 513 initial_rev = args.initial_rev
514 else: 514 else:
515 initial_rev = None 515 initial_rev = None
516 with open(appends[0], 'r') as f: 516 with open(append, 'r') as f:
517 for line in f: 517 for line in f:
518 if line.startswith('# initial_rev:'): 518 if line.startswith('# initial_rev:'):
519 initial_rev = line.split(':')[-1].strip() 519 initial_rev = line.split(':')[-1].strip()