diff options
Diffstat (limited to 'scripts/lib/devtool/upgrade.py')
| -rw-r--r-- | scripts/lib/devtool/upgrade.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 441dd35bbd..ab7acd16c6 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py | |||
| @@ -33,7 +33,7 @@ sys.path = sys.path + [devtool_path] | |||
| 33 | 33 | ||
| 34 | import oe.recipeutils | 34 | import oe.recipeutils |
| 35 | from devtool import standard | 35 | from devtool import standard |
| 36 | from devtool import exec_build_env_command, setup_tinfoil, DevtoolError, parse_recipe, use_external_build, update_unlockedsigs | 36 | from devtool import exec_build_env_command, setup_tinfoil, DevtoolError, parse_recipe, use_external_build, update_unlockedsigs, check_prerelease_version |
| 37 | 37 | ||
| 38 | logger = logging.getLogger('devtool') | 38 | logger = logging.getLogger('devtool') |
| 39 | 39 | ||
| @@ -420,8 +420,13 @@ def upgrade(args, config, basepath, workspace): | |||
| 420 | old_srcrev = None | 420 | old_srcrev = None |
| 421 | if old_srcrev and not args.srcrev: | 421 | if old_srcrev and not args.srcrev: |
| 422 | raise DevtoolError("Recipe specifies a SRCREV value; you must specify a new one when upgrading") | 422 | raise DevtoolError("Recipe specifies a SRCREV value; you must specify a new one when upgrading") |
| 423 | if rd.getVar('PV') == args.version and old_srcrev == args.srcrev: | 423 | old_ver = rd.getVar('PV') |
| 424 | if old_ver == args.version and old_srcrev == args.srcrev: | ||
| 424 | raise DevtoolError("Current and upgrade versions are the same version") | 425 | raise DevtoolError("Current and upgrade versions are the same version") |
| 426 | if args.version: | ||
| 427 | if bb.utils.vercmp_string(args.version, old_ver) < 0: | ||
| 428 | logger.warning('Upgrade version %s compares as less than the current version %s. If you are using a package feed for on-target upgrades or providing this recipe for general consumption, then you should increment PE in the recipe (or if there is no current PE value set, set it to "1")' % (args.version, old_ver)) | ||
| 429 | check_prerelease_version(args.version, 'devtool upgrade') | ||
| 425 | 430 | ||
| 426 | rf = None | 431 | rf = None |
| 427 | try: | 432 | try: |
