]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
base: Remove pointless createCopy/update_data calls
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 25 Feb 2014 17:41:17 +0000 (17:41 +0000)
committerSaul Wold <sgw@linux.intel.com>
Fri, 28 Feb 2014 09:32:10 +0000 (11:32 +0200)
I was asked why we had these copy and update_data calls. I can
offer no good explanation other than them perhaps once being needed
for reasons long since forgotten and superceeded.

With modern bitbake these should not be needed and shouldn't have been
for a long time. Lets therefore remove them and simplify the code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/base.bbclass

index 7837c892e5ea1263497cfa985053720e58e1cdc7..3e9051cd99f7b6a0c7e44a36f91e16c67560428d 100644 (file)
@@ -106,11 +106,8 @@ python base_do_fetch() {
     if len(src_uri) == 0:
         return
 
-    localdata = bb.data.createCopy(d)
-    bb.data.update_data(localdata)
-
     try:
-        fetcher = bb.fetch2.Fetch(src_uri, localdata)
+        fetcher = bb.fetch2.Fetch(src_uri, d)
         fetcher.download()
     except bb.fetch2.BBFetchException as e:
         raise bb.build.FuncFailed(e)
@@ -124,13 +121,10 @@ python base_do_unpack() {
     if len(src_uri) == 0:
         return
 
-    localdata = bb.data.createCopy(d)
-    bb.data.update_data(localdata)
-
-    rootdir = localdata.getVar('WORKDIR', True)
+    rootdir = d.getVar('WORKDIR', True)
 
     try:
-        fetcher = bb.fetch2.Fetch(src_uri, localdata)
+        fetcher = bb.fetch2.Fetch(src_uri, d)
         fetcher.unpack(rootdir)
     except bb.fetch2.BBFetchException as e:
         raise bb.build.FuncFailed(e)
@@ -653,11 +647,8 @@ python do_cleanall() {
     if len(src_uri) == 0:
         return
 
-    localdata = bb.data.createCopy(d)
-    bb.data.update_data(localdata)
-
     try:
-        fetcher = bb.fetch2.Fetch(src_uri, localdata)
+        fetcher = bb.fetch2.Fetch(src_uri, d)
         fetcher.clean()
     except bb.fetch2.BBFetchException, e:
         raise bb.build.FuncFailed(e)