From: Chris Larson <clarson@kergoth.com>
To: openembedded-devel@lists.openembedded.org
Cc: Chris Larson <clarson@mvista.com>
Subject: [PATCH] bitbake.conf: rework FILESPATH generation.
Date: Thu, 19 Feb 2009 16:28:52 -0700 [thread overview]
Message-ID: <1235086132-21843-1-git-send-email-clarson@kergoth.com> (raw)
From: Chris Larson <clarson@mvista.com>
Rework FILESPATH generation to be done in bitbake.conf, avoiding the
confusion about it being in multiple places. Adds FILESPATHBASE and
FILESPATHPKG which can be manipulated rather than manipulating FILESPATH
directly.
One usage possibility:
FILESPATHBASE =. "${TOPDIR}/files:"
Which would let me provide a custom busybox config for this build by
copying the defconfig from the openembedded metadata into my
build/files/busybox-1.0/ directory, for example.
Signed-off-by: Chris Larson <clarson@mvista.com>
---
classes/base.bbclass | 12 ------------
conf/bitbake.conf | 6 ++++--
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 411adc9..2cfd398 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -180,18 +180,6 @@ def base_package_name(d):
return pn
-def base_set_filespath(path, d):
- import os, bb
- filespath = []
- # The ":" ensures we have an 'empty' override
- overrides = (bb.data.getVar("OVERRIDES", d, 1) or "") + ":"
- for p in path:
- for o in overrides.split(":"):
- filespath.append(os.path.join(p, o))
- return ":".join(filespath)
-
-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):
from re import match
return " ".join(filter(lambda x: match(f, x, 0), str.split()))
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index b00d125..06efaa0 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -231,9 +231,11 @@ FILES_${PN}-locale = "${datadir}/locale"
export MANIFEST = "${FILESDIR}/manifest"
+# file:// search paths
FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}"
-FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
-FILESDIR = "${@bb.which(bb.data.getVar('FILESPATH', d, 1), '.')}"
+FILESPATHBASE = "${FILE_DIRNAME}"
+FILESPATHPKG = "${PF}:${P}:${PN}:${BP}:${BPN}:files:."
+FILESPATH = "${@':'.join(['%s/%s/%s' % (fp, p, o) for fp in d.getVar('FILESPATHBASE', 0).split(':') for p in d.getVar('FILESPATHPKG', 0).split(':') for o in (d.getVar('OVERRIDES', 0) + ':.').split(':')])}:${FILESDIR}"
##################################################################
# General work and output directories for the build system.
--
1.5.5.1.30.g58c1f
next reply other threads:[~2009-02-19 23:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-19 23:28 Chris Larson [this message]
2009-02-19 23:41 ` [PATCH] bitbake.conf: rework FILESPATH generation Denys Dmytriyenko
[not found] ` <A1953057-56C2-4B3D-BF40-9778AC3D9139@mvista.com>
2009-02-20 0:06 ` Denys Dmytriyenko
2009-02-20 0:27 ` Chris Larson
2009-02-20 0:58 ` Tom Rini
2009-02-20 11:24 ` Otavio Salvador
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1235086132-21843-1-git-send-email-clarson@kergoth.com \
--to=clarson@kergoth.com \
--cc=clarson@mvista.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.