aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-12-01 03:13:14 +0000
committerChris Larson <clarson@kergoth.com>2004-12-01 03:13:14 +0000
commit32dc1ee51940e0e57da717e3deda83335e3d46dc (patch)
treeb8ad63e6082fe7d767cc90be3510549cf3cd72d3 /classes
parent9c94082f4530a9dca6c45b228be3e623a550065a (diff)
downloadopenembedded-32dc1ee51940e0e57da717e3deda83335e3d46dc.tar.gz
Move PACKAGE_ARCH frobbing from package.oeclass to base.oeclass.
BKrev: 41ad36cacR1Y78r2mvkhyWLkqoHG6Q
Diffstat (limited to 'classes')
-rw-r--r--classes/base.oeclass23
-rw-r--r--classes/package.oeclass22
2 files changed, 23 insertions, 22 deletions
diff --git a/classes/base.oeclass b/classes/base.oeclass
index 35c7fbecd1..22447b36ce 100644
--- a/classes/base.oeclass
+++ b/classes/base.oeclass
@@ -657,6 +657,29 @@ python __anonymous () {
pass
}
+python () {
+ 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
+}
+
+
addtask emit_manifest
python do_emit_manifest () {
# FIXME: emit a manifest here
diff --git a/classes/package.oeclass b/classes/package.oeclass
index db95b27e34..fbd3fbb39a 100644
--- a/classes/package.oeclass
+++ b/classes/package.oeclass
@@ -76,28 +76,6 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
oe.data.setVar('PACKAGES', ' '.join(packages), d)
-python () {
- 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, stat, errno, re