Skip to contentSkip to conversation

utils.bbclass: fix is_machine_specific

PATCH In review Eric Bénard 3 participants 3 messages Sep 20, 2010 – Sep 21, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 utils.bbclass: fix is_machine_specific

* base.bbclass can set a package's PACKAGE_ARCH to MACHINE_ARCH if it finds file:// in the SRC_URI and the corresponding file is machine specific (recipes/foo/foo-1.0/<some machine>/)
* but is_machine_specific actually fails to detect these files as urldata.path is used instead of urldata.localpath thus preventing the comparison of the file's path with machinepaths
* tested with bitbake HEAD & 1.8.18, with OE's tree alone and OE's tree plus an overlay.

---
 classes/utils.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
classes/utils.bbclass +1 -1
index 0a7a045..1c636be 100644
@@ -54,7 +54,7 @@ def is_machine_specific(d):
     urldatadict = bb.fetch.init(d.getVar("SRC_URI", True).split(), d, True)
     for urldata in (urldata for urldata in urldatadict.itervalues()
                     if urldata.type == "file"):
-        if any(urldata.path.startswith(mp + "/") for mp in machinepaths):
+        if any(urldata.localpath.startswith(mp + "/") for mp in machinepaths):
             return True
 
 def subprocess_setup():
Signature · 1 line
1.6.3.3
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Eric Bénard

* base.bbclass can set a package's PACKAGE_ARCH to MACHINE_ARCH if it finds file:// in the SRC_URI and the corresponding file is machine specific (recipes/foo/foo-1.0/<some machine>/)
* but is_machine_specific actually fails to detect these files as urldata.path is used instead of urldata.localpath thus preventing the comparison of the file's path with machinepaths
* tested with bitbake HEAD & 1.8.18, with OE's tree alone and OE's tree plus an overlay.

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
Acked-by on v1 1/1
#2 lore raw
In reply to Eric Bénard
Quoted 10 lines · Eric Bénard

* base.bbclass can set a package's PACKAGE_ARCH to MACHINE_ARCH if it finds file:// in the SRC_URI and the corresponding file is machine specific (recipes/foo/foo-1.0/<some machine>/)
* but is_machine_specific actually fails to detect these files as urldata.path is used instead of urldata.localpath thus preventing the comparison of the file's path with machinepaths
* tested with bitbake HEAD & 1.8.18, with OE's tree alone and OE's tree plus an overlay.

Quoted 26 lines

---
 classes/utils.bbclass |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
classes/utils.bbclass +0 -0
index 0a7a045..1c636be 100644
@@ -54,7 +54,7 @@ def is_machine_specific(d):
     urldatadict = bb.fetch.init(d.getVar("SRC_URI", True).split(), d, True)
     for urldata in (urldata for urldata in urldatadict.itervalues()

                    if urldata.type == "file"):
-        if any(urldata.path.startswith(mp + "/") for mp in machinepaths):
+        if any(urldata.localpath.startswith(mp + "/") for mp in machinepaths):
            return True

 def subprocess_setup():
--
1.6.3.3

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 1 line
-Khem