classes/utils: which is in bb.utils not in bb

Submitted by Stanacar, StefanX on Sept. 17, 2013, 7:38 a.m.

Details

Message ID 1379403530-8095-1-git-send-email-stefanx.stanacar@intel.com
State New
Headers show

Commit Message

Stanacar, StefanX Sept. 17, 2013, 7:38 a.m.
This works now because of bitbake's deprecated_imports, but those
might be removed so let's change it.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
 meta/classes/utils.bbclass | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index e873c53..f9a451a 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -293,11 +293,12 @@  END
 }
 
 def check_app_exists(app, d):
-    from bb import which, data
+    import bb.utils
+    import bb.data
 
-    app = data.expand(app, d)
-    path = data.getVar('PATH', d, 1)
-    return bool(which(path, app))
+    app = bb.data.expand(app, d)
+    path = bb.data.getVar('PATH', d, 1)
+    return bool(bb.utils.which(path, app))
 
 def explode_deps(s):
     return bb.utils.explode_deps(s)