summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2004-07-23 14:55:04 +0000
committerPhil Blundell <philb@gnu.org>2004-07-23 14:55:04 +0000
commit545b18b31376dc71e710ea1dfb9552aa42f2aff5 (patch)
treeaf0bf5b21a35255603d0eb6103c420968574c5f6 /classes
parentf40d04df7b4d9658fb19ebb1bde9afe6baedaa60 (diff)
Merge bk://openembedded@openembedded.bkbits.net/packages
into workhouse.nexus.co.uk:/home/pb/oe/oe-packages 2004/07/23 15:26:19+01:00 nexus.co.uk!pb set PACKAGE_ARCH to MACHINE if using machine-specific source files. demote some trivial oe.note() calls to oe.debug() BKrev: 410126c8ZqVbuGN1Yam0nLy4VAVc0A
Diffstat (limited to 'classes')
-rw-r--r--classes/package.oeclass27
1 files changed, 25 insertions, 2 deletions
diff --git a/classes/package.oeclass b/classes/package.oeclass
index 381b4a4c76..d9d3453882 100644
--- a/classes/package.oeclass
+++ b/classes/package.oeclass
@@ -64,6 +64,27 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
oe.data.setVar('PACKAGES', ' '.join(packages), d)
+def package_frob_arch(d):
+ import oe, os
+ machine = oe.data.getVar('MACHINE', d, 1)
+ if not machine:
+ # can't specialise if MACHINE not defined
+ return:
+ old_arch = oe.data.getVar('PACKAGE_ARCH', d, 1)
+ if (old_arch == machine):
+ # Nothing to do
+ return
+ paths = []
+ for p in [ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ]:
+ paths.append(oe.data.expand(os.path.join(p, machine), d))
+ for s in oe.data.getVar('SRC_URI', d, 1).split():
+ local = oe.data.expand(oe.fetch.localpath(s, d), d)
+ for mp in paths:
+ if local.startswith(mp):
+ oe.note("overriding PACKAGE_ARCH from %s to %s" % (old_arch, machine))
+ oe.data.setVar('PACKAGE_ARCH', machine, d)
+ return
+
python populate_packages () {
import glob, copy, stat, errno, re
@@ -95,6 +116,8 @@ python populate_packages () {
oe.error("PN not defined")
return
+ package_frob_arch(d)
+
os.chdir(dvar)
def isexec(path):
@@ -370,12 +393,12 @@ python package_do_split_locales() {
import os
if (oe.data.getVar('PACKAGE_NO_LOCALE', d, 1) == '1'):
- oe.note("package requested not splitting locales")
+ oe.debug(1, "package requested not splitting locales")
return
packages = (oe.data.getVar('PACKAGES', d, 1) or "").split()
if not packages:
- oe.note("no packages to build; not splitting locales")
+ oe.debug(1, "no packages to build; not splitting locales")
return
datadir = oe.data.getVar('datadir', d, 1)