diff options
Diffstat (limited to 'scripts/lib/devtool/upgrade.py')
| -rw-r--r-- | scripts/lib/devtool/upgrade.py | 12 | 
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 4f850cf0e4..d38762373e 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py  | |||
| @@ -300,7 +300,13 @@ def upgrade(args, config, basepath, workspace): | |||
| 300 | if not rd: | 300 | if not rd: | 
| 301 | return 1 | 301 | return 1 | 
| 302 | 302 | ||
| 303 | standard._check_compatible_recipe(args.recipename, rd) | 303 | pn = rd.getVar('PN', True) | 
| 304 | if pn != args.recipename: | ||
| 305 | logger.info('Mapping %s to %s' % (args.recipename, pn)) | ||
| 306 | if pn in workspace: | ||
| 307 | raise DevtoolError("recipe %s is already in your workspace" % pn) | ||
| 308 | |||
| 309 | standard._check_compatible_recipe(pn, rd) | ||
| 304 | if rd.getVar('PV', True) == args.version and rd.getVar('SRCREV', True) == args.srcrev: | 310 | if rd.getVar('PV', True) == args.version and rd.getVar('SRCREV', True) == args.srcrev: | 
| 305 | raise DevtoolError("Current and upgrade versions are the same version" % version) | 311 | raise DevtoolError("Current and upgrade versions are the same version" % version) | 
| 306 | 312 | ||
| @@ -315,11 +321,11 @@ def upgrade(args, config, basepath, workspace): | |||
| 315 | _upgrade_error(e, rf, args.srctree) | 321 | _upgrade_error(e, rf, args.srctree) | 
| 316 | except DevtoolError as e: | 322 | except DevtoolError as e: | 
| 317 | _upgrade_error(e, rf, args.srctree) | 323 | _upgrade_error(e, rf, args.srctree) | 
| 318 | standard._add_md5(config, args.recipename, os.path.dirname(rf)) | 324 | standard._add_md5(config, pn, os.path.dirname(rf)) | 
| 319 | 325 | ||
| 320 | af = _write_append(rf, args.srctree, args.same_dir, args.no_same_dir, rev2, | 326 | af = _write_append(rf, args.srctree, args.same_dir, args.no_same_dir, rev2, | 
| 321 | config.workspace_path, rd) | 327 | config.workspace_path, rd) | 
| 322 | standard._add_md5(config, args.recipename, af) | 328 | standard._add_md5(config, pn, af) | 
| 323 | logger.info('Upgraded source extracted to %s' % args.srctree) | 329 | logger.info('Upgraded source extracted to %s' % args.srctree) | 
| 324 | return 0 | 330 | return 0 | 
| 325 | 331 | ||
