From 3097ab0f62233dc336dfe611fef4b8b633355190 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 27 May 2006 21:49:50 +0000 Subject: 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 --- openembedded/classes/base.bbclass | 32 +++++++++++++++++++++++ openembedded/classes/native.bbclass | 14 ++++++++++ openembedded/classes/rootfs_ipk.bbclass | 2 +- openembedded/classes/sanity.bbclass | 17 ++++++++++-- openembedded/classes/tinderclient.bbclass | 43 +++++++++++++++++-------------- 5 files changed, 86 insertions(+), 22 deletions(-) (limited to 'openembedded/classes') 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 = "