diff options
authorPaul Eggleton <>2018-03-27 15:59:22 +1300
committerPaul Eggleton <>2018-05-04 23:57:53 +1200
commit0947ec0a651b97a9dbd0400390e75af24167df6b (patch)
parent291f6bfde72676ede6b4e58203c61df10aeff02c (diff)
rrs_upgrade_history: handle broken version numbers
In OE-Core revision e0531174119bff21e9014b95ed1bbd0e1c01af26 we accidentally committed a new e2fsprogs recipe with 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 <>
1 files changed, 4 insertions, 0 deletions
diff --git a/rrs/tools/ b/rrs/tools/
index 783e893619..88ab0a71ee 100644
--- a/rrs/tools/
+++ b/rrs/tools/
@@ -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." %