base.bbclass: Further tweaks from OE

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2629 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie
2007-09-01 15:06:04 +00:00
parent 19e113c67f
commit 411cd0c6ae

View File

@@ -785,19 +785,23 @@ python read_subpackage_metadata () {
def base_after_parse(d): def base_after_parse(d):
import bb, os, exceptions import bb, os, exceptions
need_host = bb.data.getVar('COMPATIBLE_HOST', d, 1) source_mirror_fetch = bb.data.getVar('SOURCE_MIRROR_FETCH', d, 0)
if need_host: if not source_mirror_fetch:
import re need_host = bb.data.getVar('COMPATIBLE_HOST', d, 1)
this_host = bb.data.getVar('HOST_SYS', d, 1) if need_host:
if not re.match(need_host, this_host): import re
raise bb.parse.SkipPackage("incompatible with host %s" % this_host) this_host = bb.data.getVar('HOST_SYS', d, 1)
if not re.match(need_host, this_host):
raise bb.parse.SkipPackage("incompatible with host %s" % this_host)
need_machine = bb.data.getVar('COMPATIBLE_MACHINE', d, 1)
if need_machine:
import re
this_machine = bb.data.getVar('MACHINE', d, 1)
if this_machine and not re.match(need_machine, this_machine):
raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
need_machine = bb.data.getVar('COMPATIBLE_MACHINE', d, 1)
if need_machine:
import re
this_machine = bb.data.getVar('MACHINE', d, 1)
if this_machine and not re.match(need_machine, this_machine):
raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
pn = bb.data.getVar('PN', d, 1) pn = bb.data.getVar('PN', d, 1)
@@ -844,7 +848,7 @@ def base_after_parse(d):
paths = [] paths = []
for p in [ "${PF}", "${P}", "${PN}", "files", "" ]: for p in [ "${PF}", "${P}", "${PN}", "files", "" ]:
path = 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): if os.path.isdir(path):
paths.append(path) paths.append(path)
if len(paths) == 0: if len(paths) == 0:
return return