summaryrefslogtreecommitdiff
path: root/openembedded/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-05-27 21:49:50 +0000
committerRichard Purdie <richard@openedhand.com>2006-05-27 21:49:50 +0000
commit3097ab0f62233dc336dfe611fef4b8b633355190 (patch)
tree8173abc003c9703cf625d4e100f57d3d5141177d /openembedded/classes
parentb77fcc05cacdf70819cc226d53156a9e70e84e04 (diff)
downloadopenembedded-core-3097ab0f62233dc336dfe611fef4b8b633355190.tar.gz
openembedded-core-3097ab0f62233dc336dfe611fef4b8b633355190.tar.bz2
openembedded-core-3097ab0f62233dc336dfe611fef4b8b633355190.tar.xz
openembedded-core-3097ab0f62233dc336dfe611fef4b8b633355190.zip
Sync conf and classes with OE - changes have been tested and don't affect poky
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@446 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/classes')
-rw-r--r--openembedded/classes/base.bbclass32
-rw-r--r--openembedded/classes/native.bbclass14
-rw-r--r--openembedded/classes/rootfs_ipk.bbclass2
-rw-r--r--openembedded/classes/sanity.bbclass17
-rw-r--r--openembedded/classes/tinderclient.bbclass43
5 files changed, 86 insertions, 22 deletions
diff --git a/openembedded/classes/base.bbclass b/openembedded/classes/base.bbclass
index 1b31d4345..673e2f054 100644
--- a/openembedded/classes/base.bbclass
+++ b/openembedded/classes/base.bbclass
@@ -475,6 +475,34 @@ python base_do_patch() {
else:
pname = os.path.basename(unpacked)
+ if "mindate" in parm:
+ mindate = parm["mindate"]
+ else:
+ mindate = 0
+
+ if "maxdate" in parm:
+ maxdate = parm["maxdate"]
+ else:
+ maxdate = "20711226"
+
+ pn = bb.data.getVar('PN', d, 1)
+ srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1)
+
+ if not srcdate:
+ srcdate = bb.data.getVar('SRCDATE', d, 1)
+
+ if srcdate == "now":
+ srcdate = bb.data.getVar('DATE', d, 1)
+
+ if (maxdate < srcdate) or (mindate > srcdate):
+ if (maxdate < srcdate):
+ bb.note("Patch '%s' is outdated" % pname)
+
+ if (mindate > srcdate):
+ bb.note("Patch '%s' is predated" % pname)
+
+ continue
+
bb.note("Applying patch '%s'" % pname)
bb.data.setVar("do_patchcmd", bb.data.getVar("PATCHCMD", d, 1) % (pnum, pname, unpacked), d)
bb.data.setVarFlag("do_patchcmd", "func", 1, d)
@@ -743,6 +771,10 @@ ftp://ftp.kernel.org/pub ftp://ftp.uk.kernel.org/pub
ftp://ftp.kernel.org/pub ftp://ftp.hk.kernel.org/pub
ftp://ftp.kernel.org/pub ftp://ftp.au.kernel.org/pub
ftp://ftp.kernel.org/pub ftp://ftp.jp.kernel.org/pub
+ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/
+ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.surfnet.nl/pub/security/gnupg/
+ftp://ftp.gnupg.org/gcrypt/ http://gulus.USherbrooke.ca/pub/appl/GnuPG/
+
ftp://.*/.*/ http://www.oesources.org/source/current/
http://.*/.*/ http://www.oesources.org/source/current/
}
diff --git a/openembedded/classes/native.bbclass b/openembedded/classes/native.bbclass
index 011e48cf6..04ff7d92d 100644
--- a/openembedded/classes/native.bbclass
+++ b/openembedded/classes/native.bbclass
@@ -36,6 +36,20 @@ CXXFLAGS = "${BUILD_CFLAGS}"
LDFLAGS = "${BUILD_LDFLAGS}"
LDFLAGS_build-darwin = "-L${STAGING_DIR}/${BUILD_SYS}/lib "
+
+# set the compiler as well. It could have been set to something else
+export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
+export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}"
+export F77 = "${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}"
+export CPP = "${HOST_PREFIX}gcc -E"
+export LD = "${HOST_PREFIX}ld"
+export CCLD = "${CC}"
+export AR = "${HOST_PREFIX}ar"
+export AS = "${HOST_PREFIX}as"
+export RANLIB = "${HOST_PREFIX}ranlib"
+export STRIP = "${HOST_PREFIX}strip"
+
+
# Path prefixes
base_prefix = "${exec_prefix}"
prefix = "${STAGING_DIR}"
diff --git a/openembedded/classes/rootfs_ipk.bbclass b/openembedded/classes/rootfs_ipk.bbclass
index 2880411c3..272950350 100644
--- a/openembedded/classes/rootfs_ipk.bbclass
+++ b/openembedded/classes/rootfs_ipk.bbclass
@@ -37,7 +37,7 @@ real_do_rootfs () {
fi
mkdir -p ${T}
echo "src oe file:${DEPLOY_DIR_IPK}" > ${T}/ipkg.conf
- ipkgarchs="all any noarch ${TARGET_ARCH} ${IPKG_ARCHS} ${MACHINE}"
+ ipkgarchs="${IPKG_ARCHS}"
priority=1
for arch in $ipkgarchs; do
echo "arch $arch $priority" >> ${T}/ipkg.conf
diff --git a/openembedded/classes/sanity.bbclass b/openembedded/classes/sanity.bbclass
index 8253b2793..a626162ff 100644
--- a/openembedded/classes/sanity.bbclass
+++ b/openembedded/classes/sanity.bbclass
@@ -4,7 +4,11 @@
def raise_sanity_error(msg):
import bb
- bb.fatal("Openembedded's config sanity checker detected a potential misconfiguration.\nEither fix the cause of this error or at your own risk disable the checker (see sanity.conf).\n%s" % msg)
+ bb.fatal(""" Openembedded's config sanity checker detected a potential misconfiguration.
+ Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
+ Following is the list of potential problems / advisories:
+
+ %s""" % msg)
def check_conf_exists(fn, data):
import bb, os
@@ -31,7 +35,10 @@ def check_app_exists(app, d):
def check_sanity(e):
from bb import note, error, data, __version__
from bb.event import Handled, NotHandled, getName
- from distutils.version import LooseVersion
+ try:
+ from distutils.version import LooseVersion
+ except ImportError:
+ def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1
import os
# Check the bitbake version meets minimum requirements
@@ -83,6 +90,12 @@ def check_sanity(e):
if not check_app_exists('texi2html', e.data):
raise_sanity_error('Please install the texi2html binary')
+ if not check_app_exists('cvs', e.data):
+ raise_sanity_error('Please install the cvs utility')
+
+ if not check_app_exists('svn', e.data):
+ raise_sanity_error('Please install the svn utility')
+
oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True )
if not oes_bb_conf:
raise_sanity_error('You do not include OpenEmbeddeds version of conf/bitbake.conf')
diff --git a/openembedded/classes/tinderclient.bbclass b/openembedded/classes/tinderclient.bbclass
index f9243f710..6e10d0f34 100644
--- a/openembedded/classes/tinderclient.bbclass
+++ b/openembedded/classes/tinderclient.bbclass
@@ -1,3 +1,21 @@
+def tinder_http_post(server, selector, content_type, body):
+ import httplib
+ # now post it
+ for i in range(0,5):
+ try:
+ h = httplib.HTTP(server)
+ h.putrequest('POST', selector)
+ h.putheader('content-type', content_type)
+ h.putheader('content-length', str(len(body)))
+ h.endheaders()
+ h.send(body)
+ errcode, errmsg, headers = h.getreply()
+ #print errcode, errmsg, headers
+ return (errcode,errmsg, headers, h.file)
+ except:
+ # try again
+ pass
+
def tinder_form_data(bound, dict, log):
output = []
#br
@@ -29,7 +47,7 @@ def tinder_format_http_post(d,status,log):
for the tinderbox to be happy.
"""
- from bb import data
+ from bb import data, build
import os,random
# the variables we will need to send on this form post
@@ -72,7 +90,6 @@ def tinder_build_start(d):
on the server.
"""
from bb import data
- import httplib
# get the body and type
content_type, body = tinder_format_http_post(d,None,None)
@@ -84,15 +101,9 @@ def tinder_build_start(d):
#print "selector %s and url %s" % (selector, url)
# now post it
- h = httplib.HTTP(server)
- h.putrequest('POST', selector)
- h.putheader('content-type', content_type)
- h.putheader('content-length', str(len(body)))
- h.endheaders()
- h.send(body)
- errcode, errmsg, headers = h.getreply()
+ errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body)
#print errcode, errmsg, headers
- report = h.file.read()
+ report = h_file.read()
# now let us find the machine id that was assigned to us
search = "<machine id='"
@@ -113,7 +124,6 @@ def tinder_send_http(d, status, log):
Send this log as build status
"""
from bb import data
- import httplib
# get the body and type
@@ -124,13 +134,7 @@ def tinder_send_http(d, status, log):
selector = url + "/xml/build_status.pl"
# now post it
- h = httplib.HTTP(server)
- h.putrequest('POST', selector)
- h.putheader('content-type', content_type)
- h.putheader('content-length', str(len(body)))
- h.endheaders()
- h.send(body)
- errcode, errmsg, headers = h.getreply()
+ errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body)
#print errcode, errmsg, headers
#print h.file.read()
@@ -247,7 +251,7 @@ def tinder_do_tinder_report(event):
implemented yet.
"""
from bb.event import getName
- from bb import data, mkdirhier
+ from bb import data, mkdirhier, build
import os, glob
# variables
@@ -289,6 +293,7 @@ def tinder_do_tinder_report(event):
elif name == "PkgSucceeded":
log += "<--- TINDERBOX Package %s done (SUCCESS)\n" % data.getVar('P', event.data, True)
elif name == "PkgFailed":
+ build.exec_task('do_clean', event.data)
log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % data.getVar('P', event.data, True)
status = 200
elif name == "BuildCompleted":