mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
1d4069255b
commit
d6cd355def
@@ -434,12 +434,6 @@ def update_recipe(args, config, basepath, workspace):
|
|||||||
logger.error("no recipe named %s in your workspace" % args.recipename)
|
logger.error("no recipe named %s in your workspace" % args.recipename)
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
# Get initial revision from bbappend
|
|
||||||
appends = glob.glob(os.path.join(config.workspace_path, 'appends', '%s_*.bbappend' % args.recipename))
|
|
||||||
if not appends:
|
|
||||||
logger.error('unable to find workspace bbappend for recipe %s' % args.recipename)
|
|
||||||
return -1
|
|
||||||
|
|
||||||
tinfoil = setup_tinfoil()
|
tinfoil = setup_tinfoil()
|
||||||
import bb
|
import bb
|
||||||
from oe.patch import GitApplyTree
|
from oe.patch import GitApplyTree
|
||||||
@@ -450,6 +444,12 @@ def update_recipe(args, config, basepath, workspace):
|
|||||||
return -1
|
return -1
|
||||||
recipefile = rd.getVar('FILE', True)
|
recipefile = rd.getVar('FILE', True)
|
||||||
|
|
||||||
|
# Get initial revision from bbappend
|
||||||
|
append = os.path.join(config.workspace_path, 'appends', '%s.bbappend' % os.path.splitext(os.path.basename(recipefile))[0])
|
||||||
|
if not os.path.exists(append):
|
||||||
|
logger.error('unable to find workspace bbappend for recipe %s' % args.recipename)
|
||||||
|
return -1
|
||||||
|
|
||||||
orig_src_uri = rd.getVar('SRC_URI', False) or ''
|
orig_src_uri = rd.getVar('SRC_URI', False) or ''
|
||||||
if args.mode == 'auto':
|
if args.mode == 'auto':
|
||||||
if 'git://' in orig_src_uri:
|
if 'git://' in orig_src_uri:
|
||||||
@@ -520,7 +520,7 @@ def update_recipe(args, config, basepath, workspace):
|
|||||||
initial_rev = args.initial_rev
|
initial_rev = args.initial_rev
|
||||||
else:
|
else:
|
||||||
initial_rev = None
|
initial_rev = None
|
||||||
with open(appends[0], 'r') as f:
|
with open(append, 'r') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if line.startswith('# initial_rev:'):
|
if line.startswith('# initial_rev:'):
|
||||||
initial_rev = line.split(':')[-1].strip()
|
initial_rev = line.split(':')[-1].strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user