mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 00:49:33 +02:00
base.bbclass: Improve performance with SRC_URI_OVERRIDES_PACKAGE_ARCH enabled (14% parsing speedup)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2483 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -792,9 +792,9 @@ python read_subpackage_metadata () {
|
|||||||
bb.data.setVar(key, sdata[key], d)
|
bb.data.setVar(key, sdata[key], d)
|
||||||
}
|
}
|
||||||
|
|
||||||
def base_after_parse_two(d):
|
def base_after_parse(d):
|
||||||
import bb
|
import bb, os, exceptions
|
||||||
import exceptions
|
|
||||||
need_host = bb.data.getVar('COMPATIBLE_HOST', d, 1)
|
need_host = bb.data.getVar('COMPATIBLE_HOST', d, 1)
|
||||||
if need_host:
|
if need_host:
|
||||||
import re
|
import re
|
||||||
@@ -820,9 +820,6 @@ def base_after_parse_two(d):
|
|||||||
if use_nls != None:
|
if use_nls != None:
|
||||||
bb.data.setVar('USE_NLS', use_nls, d)
|
bb.data.setVar('USE_NLS', use_nls, d)
|
||||||
|
|
||||||
def base_after_parse(d):
|
|
||||||
import bb, os
|
|
||||||
|
|
||||||
# Make sure MACHINE isn't exported
|
# Make sure MACHINE isn't exported
|
||||||
# (breaks binutils at least)
|
# (breaks binutils at least)
|
||||||
bb.data.delVarFlag('MACHINE', 'export', d)
|
bb.data.delVarFlag('MACHINE', 'export', d)
|
||||||
@@ -856,7 +853,12 @@ def base_after_parse(d):
|
|||||||
|
|
||||||
paths = []
|
paths = []
|
||||||
for p in [ "${PF}", "${P}", "${PN}", "files", "" ]:
|
for p in [ "${PF}", "${P}", "${PN}", "files", "" ]:
|
||||||
paths.append(bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d))
|
path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d)
|
||||||
|
if os.path.isdir(path):
|
||||||
|
paths.append(path)
|
||||||
|
if len(paths) == 0:
|
||||||
|
return
|
||||||
|
|
||||||
for s in bb.data.getVar('SRC_URI', d, 1).split():
|
for s in bb.data.getVar('SRC_URI', d, 1).split():
|
||||||
if not s.startswith("file://"):
|
if not s.startswith("file://"):
|
||||||
continue
|
continue
|
||||||
@@ -868,7 +870,6 @@ def base_after_parse(d):
|
|||||||
return
|
return
|
||||||
|
|
||||||
python () {
|
python () {
|
||||||
base_after_parse_two(d)
|
|
||||||
base_after_parse(d)
|
base_after_parse(d)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user