Skip to contentSkip to conversation

wic: Use os.rename instead of bb.utils.rename

PATCH New Khem Raj 1 participant 1 message Nov 10, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 wic: Use os.rename instead of bb.utils.rename

This is not invoked with bitbake context as a result bb.utils is not visible when this function is called during image creation and builds fail e.g.

NameError: name 'bb' is not defined

Cc Joshua Watt <[email protected]>
Cc Devendra Tewari <[email protected]>
---
 scripts/lib/wic/plugins/imager/direct.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/lib/wic/plugins/imager/direct.py +1 -1
index 495518fac81..c7bc2469ab5 100644
@@ -619,5 +619,5 @@ class PartitionedImage():
                              part.start + part.size_sec - 1, part.size_sec)
 
                 partimage = self.path + '.p%d' % part.num
-                bb.utils.rename(source, partimage)
+                os.rename(source, partimage)
                 self.partimages.append(partimage)
Signature · 1 line
2.33.1