]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: Add a shortcut exit from the mkdir function
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Jan 2013 13:47:17 +0000 (13:47 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Feb 2013 15:51:29 +0000 (15:51 +0000)
The mkdir function iterates over strings with many different operations,
even if ultimately the target already exists. This adds a check to the start
of the function so we don't waste time when the target already exists.

(From OE-Core rev: 06e188e673313f1eb9ae7d85ae64467c8d2a94b3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index 0f11ba9e5f7f95e7baf3a56822e55d777dafa226..8b256cf4ce99ffed04b872807522e0f9e5cc7940 100644 (file)
@@ -997,6 +997,8 @@ python populate_packages () {
                     seen.append(p)
 
             def mkdir_recurse(src, dest, paths):
+                if os.path.exists(dest + '/' + paths):
+                    return
                 while paths.startswith("./"):
                     paths = paths[2:]
                 p = "."