| Message ID | 20260116064746.3584094-1-alex@linutronix.de |
|---|---|
| State | New |
| Headers | show |
| Series | [auh,1/2] commit_changes: handle lack of recipe_dir gracefully | expand |
diff --git a/upgrade-helper.py b/upgrade-helper.py index c1c26c0..2f38e0a 100755 --- a/upgrade-helper.py +++ b/upgrade-helper.py @@ -393,7 +393,8 @@ class Updater(object): I(" %s: Auto commit changes ..." % pns) for p in g['pkgs']: - self.git.add(p['recipe_dir']) + if 'recipe_dir' in p: + self.git.add(p['recipe_dir']) self.git.commit(g['commit_msg'], self.opts['author']) stdout = self.git.create_patch(g['workdir'])
Recent changes exposed this issue: if recipe_dir is not set, then the code should not try to access it, and instead simply skip the recipe, and handle it as a 'nothing to commit' situation. recipe_dir may not be set when for some reason reading the recipe environment has failed. Signed-off-by: Alexander Kanavin <alex@linutronix.de> --- upgrade-helper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)