summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/__init__.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-09-28 15:51:40 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-11 12:14:27 +0000
commit624a07a7665020f3c3e3d830d96bab41dfc8ec5e (patch)
tree0234b03d606618a579374ecabdce8b2d629a5083 /scripts/lib/devtool/__init__.py
parent1d31cee42d7fdd0f7881a44447492efc2db3c95a (diff)
downloadpoky-624a07a7665020f3c3e3d830d96bab41dfc8ec5e.tar.gz
devtool: show some warnings for upgrade versions
* Show a warning in devtool upgrade if the version is less than the current version suggesting that the user may need to bump PE in the recipe * Show a warning in devtool add and devtool upgrade if the version looks like a pre-release version suggesting using a version number that won't mess up the progression when you come to upgrade to the final release version. (From OE-Core rev: 92c4d9be9ed365c449ea1ac5a18ddb15e4a36b2d) 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>
Diffstat (limited to 'scripts/lib/devtool/__init__.py')
-rw-r--r--scripts/lib/devtool/__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index 94e3d7d4b3..20ab83f83d 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -337,3 +337,16 @@ def update_unlockedsigs(basepath, workspace, fixed_setup, extra=None):
337 for pn in newunlocked: 337 for pn in newunlocked:
338 f.write(' ' + pn) 338 f.write(' ' + pn)
339 f.write('"') 339 f.write('"')
340
341def check_prerelease_version(ver, operation):
342 if 'pre' in ver or 'rc' in ver:
343 logger.warning('Version "%s" looks like a pre-release version. '
344 'If that is the case, in order to ensure that the '
345 'version doesn\'t appear to go backwards when you '
346 'later upgrade to the final release version, it is '
347 'recommmended that instead you use '
348 '<current version>+<pre-release version> e.g. if '
349 'upgrading from 1.9 to 2.0-rc2 use "1.9+2.0-rc2". '
350 'If you prefer not to reset and re-try, you can change '
351 'the version after %s succeeds using "devtool rename" '
352 'with -V/--version.' % (ver, operation))