aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorPaul Sokolovsky <pmiscml@gmail.com>2008-02-25 00:56:11 +0000
committerPaul Sokolovsky <pmiscml@gmail.com>2008-02-25 00:56:11 +0000
commita5a529f7e8855b28ac80a0854ebde5efd13afe6d (patch)
tree85b30a460d2d2f73c944cd71bfaae0bdd74be24f /classes
parent89edf25da6cbf515358aaa5fd64987d2a04bbc4f (diff)
parent626030cab71d4fd02092e25aeff27f2b87d3e257 (diff)
downloadopenembedded-a5a529f7e8855b28ac80a0854ebde5efd13afe6d.tar.gz
merge of '7460b51ee9cc9d17b403416ed3a84895ac86e667'
and 'cad8e5a9c094705cd6895a456eac5da6d41967bb'
Diffstat (limited to 'classes')
-rw-r--r--classes/base.bbclass40
-rw-r--r--classes/nylon-mirrors.bbclass8
-rw-r--r--classes/oplinux-mirrors.bbclass16
-rw-r--r--classes/sanity.bbclass19
4 files changed, 35 insertions, 48 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 3250e0ca43..2f74104185 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -85,7 +85,7 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, data):
def base_dep_prepend(d):
- import bb;
+ import bb
#
# Ideally this will check a flag so we will operate properly in
# the case where host == build == target, for now we don't work in
@@ -777,8 +777,10 @@ def get_subpkgedata_fn(pkg, d):
import bb, os
archs = bb.data.expand("${PACKAGE_ARCHS}", d).split(" ")
archs.reverse()
+ pkgdata = bb.data.expand('${STAGING_DIR}/pkgdata/', d)
+ targetdir = bb.data.expand('${TARGET_VENDOR}-${TARGET_OS}/runtime/', d)
for arch in archs:
- fn = bb.data.expand('${STAGING_DIR}/pkgdata/' + arch + '${TARGET_VENDOR}-${TARGET_OS}/runtime/%s' % pkg, d)
+ fn = pkgdata + arch + targetdir + pkg
if os.path.exists(fn):
return fn
return bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
@@ -814,6 +816,20 @@ python read_subpackage_metadata () {
bb.data.setVar(key, sdata[key], d)
}
+# Make sure MACHINE isn't exported
+# (breaks binutils at least)
+MACHINE[unexport] = "1"
+
+# Make sure TARGET_ARCH isn't exported
+# (breaks Makefiles using implicit rules, e.g. quilt, as GNU make has this
+# in them, undocumented)
+TARGET_ARCH[unexport] = "1"
+
+# Make sure DISTRO isn't exported
+# (breaks sysvinit at least)
+DISTRO[unexport] = "1"
+
+
def base_after_parse(d):
import bb, os, exceptions
@@ -833,8 +849,6 @@ def base_after_parse(d):
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)
# OBSOLETE in bitbake 1.7.4
@@ -846,22 +860,6 @@ def base_after_parse(d):
if use_nls != None:
bb.data.setVar('USE_NLS', use_nls, d)
- # Make sure MACHINE isn't exported
- # (breaks binutils at least)
- bb.data.delVarFlag('MACHINE', 'export', d)
- bb.data.setVarFlag('MACHINE', 'unexport', 1, d)
-
- # Make sure TARGET_ARCH isn't exported
- # (breaks Makefiles using implicit rules, e.g. quilt, as GNU make has this
- # in them, undocumented)
- bb.data.delVarFlag('TARGET_ARCH', 'export', d)
- bb.data.setVarFlag('TARGET_ARCH', 'unexport', 1, d)
-
- # Make sure DISTRO isn't exported
- # (breaks sysvinit at least)
- bb.data.delVarFlag('DISTRO', 'export', d)
- bb.data.setVarFlag('DISTRO', 'unexport', 1, d)
-
# Git packages should DEPEND on git-native
srcuri = bb.data.getVar('SRC_URI', d, 1)
if "git://" in srcuri:
@@ -891,7 +889,7 @@ def base_after_parse(d):
if len(paths) == 0:
return
- for s in bb.data.getVar('SRC_URI', d, 1).split():
+ for s in srcuri.split():
if not s.startswith("file://"):
continue
local = bb.data.expand(bb.fetch.localpath(s, d), d)
diff --git a/classes/nylon-mirrors.bbclass b/classes/nylon-mirrors.bbclass
index 25a8b87d9b..02fddc01ba 100644
--- a/classes/nylon-mirrors.bbclass
+++ b/classes/nylon-mirrors.bbclass
@@ -1,6 +1,6 @@
MIRRORS_append () {
-ftp://.*/.*/ http://meshcube.org/nylon/stable/sources/
-https?://.*/.*/ http://meshcube.org/nylon/stable/sources/
-ftp://.*/.*/ http://meshcube.org/nylon/unstable/sources/
-https?://.*/.*/ http://meshcube.org/nylon/unstable/sources/
+ftp://.*/.* http://meshcube.org/nylon/stable/sources/
+https?://.*/.* http://meshcube.org/nylon/stable/sources/
+ftp://.*/.* http://meshcube.org/nylon/unstable/sources/
+https?://.*/.* http://meshcube.org/nylon/unstable/sources/
} \ No newline at end of file
diff --git a/classes/oplinux-mirrors.bbclass b/classes/oplinux-mirrors.bbclass
index c76e822ce3..59c199485c 100644
--- a/classes/oplinux-mirrors.bbclass
+++ b/classes/oplinux-mirrors.bbclass
@@ -2,13 +2,13 @@
# Released under the MIT license (see packages/COPYING)
MIRRORS_append () {
-ftp://.*/.*/ http://digital-opsis.com/oplinux/stable/sources/
-https?://.*/.*/ http://digital-opsis.com/oplinux/stable/sources/
-ftp://.*/.*/ http://digital-opsis.com/oplinux/unstable/sources/
-https?://.*/.*/ http://digital-opsis.com/oplinux/unstable/sources/
+ftp://.*/.* http://digital-opsis.com/oplinux/stable/sources/
+https?://.*/.* http://digital-opsis.com/oplinux/stable/sources/
+ftp://.*/.* http://digital-opsis.com/oplinux/unstable/sources/
+https?://.*/.* http://digital-opsis.com/oplinux/unstable/sources/
-ftp://.*/.*/ http://digital-opsis.com/oplinux-uclibc/stable/sources/
-https?://.*/.*/ http://digital-opsis.com/oplinux-uclibc/stable/sources/
-ftp://.*/.*/ http://digital-opsis.com/oplinux-uclibc/unstable/sources/
-https?://.*/.*/ http://digital-opsis.com/oplinux-uclibc/unstable/sources/
+ftp://.*/.* http://digital-opsis.com/oplinux-uclibc/stable/sources/
+https?://.*/.* http://digital-opsis.com/oplinux-uclibc/stable/sources/
+ftp://.*/.* http://digital-opsis.com/oplinux-uclibc/unstable/sources/
+https?://.*/.* http://digital-opsis.com/oplinux-uclibc/unstable/sources/
}
diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass
index 9ef2f09fe0..44c74a0354 100644
--- a/classes/sanity.bbclass
+++ b/classes/sanity.bbclass
@@ -2,15 +2,6 @@
# Sanity check the users setup for common misconfigurations
#
-#
-# SANITY_ABI allows us to notify users when the format of TMPDIR changes in
-# an incompatible way. Such changes should usually be detailed in the commit
-# that breaks the format and have been previously discussed on the mailing list
-# with general agreement from the core team.
-#
-SANITY_ABI = "0"
-SANITY_ABIFILE = "${TMPDIR}/abi_version"
-
def raise_sanity_error(msg):
import bb
bb.fatal(""" Openembedded's config sanity checker detected a potential misconfiguration.
@@ -146,7 +137,10 @@ def check_sanity(e):
if os.path.exists(abifile):
f = file(abifile, "r")
abi = f.read().strip()
- if (abi != current_abi):
+ if not abi.isdigit():
+ f = file(abifile, "w")
+ f.write(current_abi)
+ elif (abi != current_abi):
# Code to convert from one ABI to another could go here if possible.
messages = messages + "Error, TMPDIR has changed ABI (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi)
else:
@@ -162,11 +156,6 @@ python check_sanity_eventhandler() {
from bb import note, error, data, __version__
from bb.event import getName
- try:
- from distutils.version import LooseVersion
- except ImportError:
- def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1
-
if getName(e) == "ConfigParsed":
check_sanity(e)