summaryrefslogtreecommitdiffstats
path: root/scripts
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-04-27 15:05:52 +0100
commitd6cd355def1b9cccf82bdf81deb6508b32dd29af (patch)
treec039834930c66f0818828c842677c3f4f3b53266 /scripts
parent1d4069255b86615d1dc1e2bdcf2a75d7c594fd8b (diff)
downloadpoky-d6cd355def1b9cccf82bdf81deb6508b32dd29af.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 rev: 3332d68ef7b2a300ce8dcf5021497d98e5b17baa) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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 d561e40115..a64211211b 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -434,12 +434,6 @@ def update_recipe(args, config, basepath, workspace):
434 logger.error("no recipe named %s in your workspace" % args.recipename) 434 logger.error("no recipe named %s in your workspace" % args.recipename)
435 return -1 435 return -1
436 436
437 # Get initial revision from bbappend
438 appends = glob.glob(os.path.join(config.workspace_path, 'appends', '%s_*.bbappend' % args.recipename))
439 if not appends:
440 logger.error('unable to find workspace bbappend for recipe %s' % args.recipename)
441 return -1
442
443 tinfoil = setup_tinfoil() 437 tinfoil = setup_tinfoil()
444 import bb 438 import bb
445 from oe.patch import GitApplyTree 439 from oe.patch import GitApplyTree
@@ -450,6 +444,12 @@ def update_recipe(args, config, basepath, workspace):
450 return -1 444 return -1
451 recipefile = rd.getVar('FILE', True) 445 recipefile = rd.getVar('FILE', True)
452 446
447 # Get initial revision from bbappend
448 append = os.path.join(config.workspace_path, 'appends', '%s.bbappend' % os.path.splitext(os.path.basename(recipefile))[0])
449 if not os.path.exists(append):
450 logger.error('unable to find workspace bbappend for recipe %s' % args.recipename)
451 return -1
452
453 orig_src_uri = rd.getVar('SRC_URI', False) or '' 453 orig_src_uri = rd.getVar('SRC_URI', False) or ''
454 if args.mode == 'auto': 454 if args.mode == 'auto':
455 if 'git://' in orig_src_uri: 455 if 'git://' in orig_src_uri:
@@ -520,7 +520,7 @@ def update_recipe(args, config, basepath, workspace):
520 initial_rev = args.initial_rev 520 initial_rev = args.initial_rev
521 else: 521 else:
522 initial_rev = None 522 initial_rev = None
523 with open(appends[0], 'r') as f: 523 with open(append, 'r') as f:
524 for line in f: 524 for line in f:
525 if line.startswith('# initial_rev:'): 525 if line.startswith('# initial_rev:'):
526 initial_rev = line.split(':')[-1].strip() 526 initial_rev = line.split(':')[-1].strip()