mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
base.bbclass, bitbake.conf: add support for BP/BPN variables (backported from trunk)
commit 94c895aad5
Author: Richard Purdie <rpurdie@linux.intel.com>
Date: Fri Jan 2 10:15:45 2009 +0000
bitbake.conf: Create BPN variable containing the pruned version of
PN with various suffixes removed and use this for S and FILESPATH.
This uses naming from OE but with improved code
This commit is contained in:
parent
d1e8a463a3
commit
7c1b438d40
|
@ -149,6 +149,14 @@ def base_both_contain(variable1, variable2, checkvalue, d):
|
||||||
|
|
||||||
DEPENDS_prepend="${@base_dep_prepend(d)} "
|
DEPENDS_prepend="${@base_dep_prepend(d)} "
|
||||||
|
|
||||||
|
def base_prune_suffix(var, suffixes, d):
|
||||||
|
# See if var ends with any of the suffixes listed and
|
||||||
|
# remove it if found
|
||||||
|
for suffix in suffixes:
|
||||||
|
if var.endswith(suffix):
|
||||||
|
return var.replace(suffix, "")
|
||||||
|
return var
|
||||||
|
|
||||||
def base_set_filespath(path, d):
|
def base_set_filespath(path, d):
|
||||||
import os, bb
|
import os, bb
|
||||||
filespath = []
|
filespath = []
|
||||||
|
@ -159,7 +167,7 @@ def base_set_filespath(path, d):
|
||||||
filespath.append(os.path.join(p, o))
|
filespath.append(os.path.join(p, o))
|
||||||
return ":".join(filespath)
|
return ":".join(filespath)
|
||||||
|
|
||||||
FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"
|
FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"
|
||||||
|
|
||||||
def oe_filter(f, str, d):
|
def oe_filter(f, str, d):
|
||||||
from re import match
|
from re import match
|
||||||
|
|
|
@ -135,6 +135,13 @@ EXTENDPEVER = "${@['','${PE\x7d:'][bb.data.getVar('PE',d,1) > 0]}"
|
||||||
DEBPV = "${EXTENDPEVER}${PV}-${PR}"
|
DEBPV = "${EXTENDPEVER}${PV}-${PR}"
|
||||||
P = "${PN}-${PV}"
|
P = "${PN}-${PV}"
|
||||||
|
|
||||||
|
# Base package name
|
||||||
|
# Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
|
||||||
|
# otherwise it is the same as PN and P
|
||||||
|
SPECIAL_PKGSUFFIX = "-native -cross-sdk -cross -sdk -initial -intermediate"
|
||||||
|
BPN = "${@base_prune_suffix(bb.data.getVar('PN', d, True), bb.data.getVar('SPECIAL_PKGSUFFIX', d, True).split(), d)}"
|
||||||
|
BP = "${BPN}-${PV}"
|
||||||
|
|
||||||
# Package info.
|
# Package info.
|
||||||
|
|
||||||
SECTION = "base"
|
SECTION = "base"
|
||||||
|
@ -217,7 +224,7 @@ STAMP = "${TMPDIR}/stamps/${PF}"
|
||||||
WORKDIR = "${TMPDIR}/work/${PF}"
|
WORKDIR = "${TMPDIR}/work/${PF}"
|
||||||
T = "${WORKDIR}/temp"
|
T = "${WORKDIR}/temp"
|
||||||
D = "${WORKDIR}/image"
|
D = "${WORKDIR}/image"
|
||||||
S = "${WORKDIR}/${P}"
|
S = "${WORKDIR}/${BP}"
|
||||||
B = "${S}"
|
B = "${S}"
|
||||||
|
|
||||||
STAGING_DIR = "${TMPDIR}/staging"
|
STAGING_DIR = "${TMPDIR}/staging"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user