[oe-commits] Chris Larson : base.bbclass: make oe_unpack_file of dirs use FILESPATH, not FILESDIR.

GIT User account git at amethyst.openembedded.net
Sat Mar 21 19:10:00 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 630555abb7ed906d6cb4bedecc94c34db84328ea
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=630555abb7ed906d6cb4bedecc94c34db84328ea

Author: Chris Larson <clarson at mvista.com>
Date:   Thu Feb 26 15:39:59 2009 -0800

base.bbclass: make oe_unpack_file of dirs use FILESPATH, not FILESDIR.

Signed-off-by: Chris Larson <clarson at mvista.com>

---

 classes/base.bbclass |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/classes/base.bbclass b/classes/base.bbclass
index cf4b5c5..caaa6b2 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -689,15 +689,18 @@ def oe_unpack_file(file, data, url = None):
 			cmd = '%s -a' % cmd
 		cmd = '%s %s' % (cmd, file)
 	elif os.path.isdir(file):
-		filesdir = os.path.realpath(bb.data.getVar("FILESDIR", data, 1))
 		destdir = "."
-		if file[0:len(filesdir)] == filesdir:
-			destdir = file[len(filesdir):file.rfind('/')]
-			destdir = destdir.strip('/')
-			if len(destdir) < 1:
-				destdir = "."
-			elif not os.access("%s/%s" % (os.getcwd(), destdir), os.F_OK):
-				os.makedirs("%s/%s" % (os.getcwd(), destdir))
+		filespath = bb.data.getVar("FILESPATH", data, 1).split(":")
+		for fp in filespath:
+			if file[0:len(fp)] == fp:
+				destdir = file[len(fp):file.rfind('/')]
+				destdir = destdir.strip('/')
+				if len(destdir) < 1:
+					destdir = "."
+				elif not os.access("%s/%s" % (os.getcwd(), destdir), os.F_OK):
+					os.makedirs("%s/%s" % (os.getcwd(), destdir))
+				break
+
 		cmd = 'cp -pPR %s %s/%s/' % (file, os.getcwd(), destdir)
 	else:
 		(type, host, path, user, pswd, parm) = bb.decodeurl(url)





More information about the Openembedded-commits mailing list