Skip to content
Snippets Groups Projects
Commit 7e54754c authored by Lorenzo Pagliai's avatar Lorenzo Pagliai
Browse files

[SRCREV] Improve search for recipe names

Since now, when searching for a recipe name, if the line in the SRCREV.conf
file was matched, a break occurred, and all the lines with the same commit SHA
of that line were updated. This could be the case of the SRCREV.conf file
for meta-seco-rk layer where there need to be two recipes (one for u-boot
 and one for fw-sysdata) pointing to the same commit SHA.
In that case, if both recipes had the same commit SHA, the
script could handle it and update both lines. However, if a misalignment
occured by any chance, the script could not handle it. For this reason
we search for all occurrencies of the same recipe name in the
SRCREV.conf and update separately each occurrency.
parent 68ca4c93
No related branches found
No related tags found
No related merge requests found
...@@ -22,16 +22,16 @@ def update_srcrev(srcrev, recipe_name, new_revision): ...@@ -22,16 +22,16 @@ def update_srcrev(srcrev, recipe_name, new_revision):
for line in srcrev.splitlines(): for line in srcrev.splitlines():
if pattern.search(line): if pattern.search(line):
project_line = line project_line = line
break
# Get current project revision from SRCREV file
# Assuming notation: <project> = "<hash>"
old_revision = project_line.split('"')[1]
# Update SRCREV file
srcrev = srcrev.replace(old_revision, new_revision)
if project_line is None: if project_line is None:
return None return None
# Get current project revision from SRCREV file
# Assuming notation: <project> = "<hash>"
old_revision = project_line.split('"')[1]
# Update SRCREV file
srcrev = srcrev.replace(old_revision, new_revision)
return srcrev return srcrev
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment