[oe-commits] Richard Purdie : package.bbclass: Add a shortcut exit from the mkdir function

git at git.openembedded.org git at git.openembedded.org
Wed Jan 30 17:51:13 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: f97c72d2c16daa98f26f17ad1fd234c9e49cd867
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=f97c72d2c16daa98f26f17ad1fd234c9e49cd867

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Tue Jan 29 13:47:17 2013 +0000

package.bbclass: Add a shortcut exit from the mkdir function

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.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/package.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 0f11ba9..8b256cf 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -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 = "."





More information about the Openembedded-commits mailing list