Skip to contentSkip to conversation

base.bbclass: re-adding backward compatibility with bitbake w.r.t decodeurl

PATCH Superseded Khem Raj 1 participant 1 message Jul 6, 2010

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 base.bbclass: re-adding backward compatibility with bitbake w.r.t decodeurl

I am testing this patch to restore the behavior while using unpatched bitbake. Please lend a hand in testing this fix.

Thanks
-Khem

---
 classes/base.bbclass |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
classes/base.bbclass +9 -1
index 2da0b7a..d6058f0 100644
@@ -219,7 +219,15 @@ def oe_unpack_file(file, data, url = None):
 			# The "destdir" handling was specifically done for FILESPATH
 			# items.  So, only do so for file:// entries.
 			if type == "file":
-				dest = os.path.dirname(path) or "."
+				if not host:
+				# this case is for backward compatiblity with older version
+				# of bitbake which do not have the fix
+				# http://cgit.openembedded.org/cgit.cgi/bitbake/commit/?id=ca257adc587bb0937ea76d8b32b654fdbf4192b8
+				# this should not be needed once all releases of bitbake has this fix
+				# applied/backported
+					dest = os.path.join(host, os.path.dirname(path)) or "."
+				else:
+					dest = os.path.dirname(path) or "."
 			else:
 				dest = "."
 			bb.mkdirhier("%s" % os.path.join(os.getcwd(),dest))
Signature · 1 line
1.7.1