update.py: set PN for recipe even if we fail to parse it

This ensures recipes that failed to parse sort properly instead of all
appearing at the start of the search results.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2013-03-20 15:40:15 +00:00
parent 98eed250bc
commit af920d10c9

View File

@ -108,6 +108,8 @@ def update_recipe_file(data, path, recipe, layerdir_start, repodir):
except KeyboardInterrupt: except KeyboardInterrupt:
raise raise
except BaseException as e: except BaseException as e:
if not recipe.pn:
recipe.pn = recipe.filename[:-3].split('_')[0]
logger.info("Unable to read %s: %s", fn, str(e)) logger.info("Unable to read %s: %s", fn, str(e))
def update_machine_conf_file(path, machine): def update_machine_conf_file(path, machine):