diff mbox series

[2/8] recipeutils: bbappend_recipe: fix undefined variable

Message ID 20231130220156.726263-3-jstephan@baylibre.com
State Accepted, archived
Commit 234111fb67ffbcc5492cb0cd96db25ed8f5acea0
Headers show
Series Several fixes around recipetool appendsrcfile(s) and oe.recipeutils.bbappend_recipe | expand

Commit Message

Julien Stephan Nov. 30, 2023, 10:01 p.m. UTC
In the case get_bbappend_path returns None (could not find the layer
containing the recipe) the error message tries to print the recipefile,
but it is not defined. Fix it.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
---
 meta/lib/oe/recipeutils.py | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 3336db8ab06..7465a2d0ab4 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -702,6 +702,7 @@  def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
     if not removevalues:
         removevalues = {}
 
+    recipefile = rd.getVar('FILE')
     # Determine how the bbappend should be named
     appendpath, pathok = get_bbappend_path(rd, destlayerdir, wildcardver)
     if not appendpath: