mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 18:32:13 +02:00
devtool: handle virtual providers
For modify / extract / upgrade, if the specified "recipe" is not actually a recipe but a virtual target such as virtual/kernel, map it correctly to the actual recipe and make sure we use that name within the workspace. Thanks to Chris Larson for reminding me this was still broken and for a hint on how to fix it. (From OE-Core rev: 1f7752282ffb47d2621030ddb2fa42a5e491d6d2) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
8578bc17b5
commit
db55d31dc2
@@ -300,7 +300,13 @@ def upgrade(args, config, basepath, workspace):
|
||||
if not rd:
|
||||
return 1
|
||||
|
||||
standard._check_compatible_recipe(args.recipename, rd)
|
||||
pn = rd.getVar('PN', True)
|
||||
if pn != args.recipename:
|
||||
logger.info('Mapping %s to %s' % (args.recipename, pn))
|
||||
if pn in workspace:
|
||||
raise DevtoolError("recipe %s is already in your workspace" % pn)
|
||||
|
||||
standard._check_compatible_recipe(pn, rd)
|
||||
if rd.getVar('PV', True) == args.version and rd.getVar('SRCREV', True) == args.srcrev:
|
||||
raise DevtoolError("Current and upgrade versions are the same version" % version)
|
||||
|
||||
@@ -315,11 +321,11 @@ def upgrade(args, config, basepath, workspace):
|
||||
_upgrade_error(e, rf, args.srctree)
|
||||
except DevtoolError as e:
|
||||
_upgrade_error(e, rf, args.srctree)
|
||||
standard._add_md5(config, args.recipename, os.path.dirname(rf))
|
||||
standard._add_md5(config, pn, os.path.dirname(rf))
|
||||
|
||||
af = _write_append(rf, args.srctree, args.same_dir, args.no_same_dir, rev2,
|
||||
config.workspace_path, rd)
|
||||
standard._add_md5(config, args.recipename, af)
|
||||
standard._add_md5(config, pn, af)
|
||||
logger.info('Upgraded source extracted to %s' % args.srctree)
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user