summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-03-27 15:59:22 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 23:57:53 +1200
commit0947ec0a651b97a9dbd0400390e75af24167df6b (patch)
tree77150e51f1c5a8c2d6b2d394d229dc981e5bb3e3
parent291f6bfde72676ede6b4e58203c61df10aeff02c (diff)
downloadopenembedded-core-contrib-0947ec0a651b97a9dbd0400390e75af24167df6b.tar.gz
openembedded-core-contrib-0947ec0a651b97a9dbd0400390e75af24167df6b.tar.bz2
openembedded-core-contrib-0947ec0a651b97a9dbd0400390e75af24167df6b.zip
rrs_upgrade_history: handle broken version numbers
In OE-Core revision e0531174119bff21e9014b95ed1bbd0e1c01af26 we accidentally committed a new e2fsprogs recipe with ..bb at the end of its name instead of .bb. This was fixed immediately afterwards, but when the RRS hits this commit, it doesn't fail immediately, but the bogus version "1.43." gets into the database and all subsequent commits touching the e2fsprogs recipe cause bb.utils.vercmp_part() to blow up because one of the version parts in the "previous" version in the database is apparently empty. To work around this and any similar issues, just reject any change that results in such a broken version string (on the assumption that it'll be corrected in a subsequent commit and thus we will get to re-parse the recipe then and therefore not miss the upgrade.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--rrs/tools/upgrade_history_internal.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/rrs/tools/upgrade_history_internal.py b/rrs/tools/upgrade_history_internal.py
index 783e893619..88ab0a71ee 100644
--- a/rrs/tools/upgrade_history_internal.py
+++ b/rrs/tools/upgrade_history_internal.py
@@ -62,6 +62,10 @@ def _create_upgrade(recipe_data, layerbranch, ct, title, info, logger, initial=F
pn = recipe_data.getVar('PN', True)
pv = recipe_data.getVar('PV', True)
+ if '..' in pv or pv.endswith('.'):
+ logger.warn('Invalid version for recipe %s in commit %s, ignoring' % (recipe_data.getVar('FILE', True), ct))
+ return
+
recipes = Recipe.objects.filter(pn=pn, layerbranch=layerbranch).order_by('id')
if not recipes:
logger.warn("%s: Not found in Layer branch %s." %