diff options
| author | Richard Purdie <richard@openedhand.com> | 2006-05-27 21:49:50 +0000 |
|---|---|---|
| committer | Richard Purdie <richard@openedhand.com> | 2006-05-27 21:49:50 +0000 |
| commit | 3097ab0f62233dc336dfe611fef4b8b633355190 (patch) | |
| tree | 8173abc003c9703cf625d4e100f57d3d5141177d /openembedded/classes | |
| parent | b77fcc05cacdf70819cc226d53156a9e70e84e04 (diff) | |
| download | poky-3097ab0f62233dc336dfe611fef4b8b633355190.tar.gz | |
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.bbclass | 32 | ||||
| -rw-r--r-- | openembedded/classes/native.bbclass | 14 | ||||
| -rw-r--r-- | openembedded/classes/rootfs_ipk.bbclass | 2 | ||||
| -rw-r--r-- | openembedded/classes/sanity.bbclass | 17 | ||||
| -rw-r--r-- | openembedded/classes/tinderclient.bbclass | 43 |
5 files changed, 86 insertions, 22 deletions
diff --git a/openembedded/classes/base.bbclass b/openembedded/classes/base.bbclass index 1b31d43450..673e2f0548 100644 --- a/openembedded/classes/base.bbclass +++ b/openembedded/classes/base.bbclass | |||
| @@ -475,6 +475,34 @@ python base_do_patch() { | |||
| 475 | else: | 475 | else: |
| 476 | pname = os.path.basename(unpacked) | 476 | pname = os.path.basename(unpacked) |
| 477 | 477 | ||
| 478 | if "mindate" in parm: | ||
| 479 | mindate = parm["mindate"] | ||
| 480 | else: | ||
| 481 | mindate = 0 | ||
| 482 | |||
| 483 | if "maxdate" in parm: | ||
| 484 | maxdate = parm["maxdate"] | ||
| 485 | else: | ||
| 486 | maxdate = "20711226" | ||
| 487 | |||
| 488 | pn = bb.data.getVar('PN', d, 1) | ||
| 489 | srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1) | ||
| 490 | |||
| 491 | if not srcdate: | ||
| 492 | srcdate = bb.data.getVar('SRCDATE', d, 1) | ||
| 493 | |||
| 494 | if srcdate == "now": | ||
| 495 | srcdate = bb.data.getVar('DATE', d, 1) | ||
| 496 | |||
| 497 | if (maxdate < srcdate) or (mindate > srcdate): | ||
| 498 | if (maxdate < srcdate): | ||
| 499 | bb.note("Patch '%s' is outdated" % pname) | ||
| 500 | |||
| 501 | if (mindate > srcdate): | ||
| 502 | bb.note("Patch '%s' is predated" % pname) | ||
| 503 | |||
| 504 | continue | ||
| 505 | |||
| 478 | bb.note("Applying patch '%s'" % pname) | 506 | bb.note("Applying patch '%s'" % pname) |
| 479 | bb.data.setVar("do_patchcmd", bb.data.getVar("PATCHCMD", d, 1) % (pnum, pname, unpacked), d) | 507 | bb.data.setVar("do_patchcmd", bb.data.getVar("PATCHCMD", d, 1) % (pnum, pname, unpacked), d) |
| 480 | bb.data.setVarFlag("do_patchcmd", "func", 1, d) | 508 | bb.data.setVarFlag("do_patchcmd", "func", 1, d) |
| @@ -743,6 +771,10 @@ ftp://ftp.kernel.org/pub ftp://ftp.uk.kernel.org/pub | |||
| 743 | ftp://ftp.kernel.org/pub ftp://ftp.hk.kernel.org/pub | 771 | ftp://ftp.kernel.org/pub ftp://ftp.hk.kernel.org/pub |
| 744 | ftp://ftp.kernel.org/pub ftp://ftp.au.kernel.org/pub | 772 | ftp://ftp.kernel.org/pub ftp://ftp.au.kernel.org/pub |
| 745 | ftp://ftp.kernel.org/pub ftp://ftp.jp.kernel.org/pub | 773 | ftp://ftp.kernel.org/pub ftp://ftp.jp.kernel.org/pub |
| 774 | ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/ | ||
| 775 | ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.surfnet.nl/pub/security/gnupg/ | ||
| 776 | ftp://ftp.gnupg.org/gcrypt/ http://gulus.USherbrooke.ca/pub/appl/GnuPG/ | ||
| 777 | |||
| 746 | ftp://.*/.*/ http://www.oesources.org/source/current/ | 778 | ftp://.*/.*/ http://www.oesources.org/source/current/ |
| 747 | http://.*/.*/ http://www.oesources.org/source/current/ | 779 | http://.*/.*/ http://www.oesources.org/source/current/ |
| 748 | } | 780 | } |
diff --git a/openembedded/classes/native.bbclass b/openembedded/classes/native.bbclass index 011e48cf62..04ff7d92d1 100644 --- a/openembedded/classes/native.bbclass +++ b/openembedded/classes/native.bbclass | |||
| @@ -36,6 +36,20 @@ CXXFLAGS = "${BUILD_CFLAGS}" | |||
| 36 | LDFLAGS = "${BUILD_LDFLAGS}" | 36 | LDFLAGS = "${BUILD_LDFLAGS}" |
| 37 | LDFLAGS_build-darwin = "-L${STAGING_DIR}/${BUILD_SYS}/lib " | 37 | LDFLAGS_build-darwin = "-L${STAGING_DIR}/${BUILD_SYS}/lib " |
| 38 | 38 | ||
| 39 | |||
| 40 | # set the compiler as well. It could have been set to something else | ||
| 41 | export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}" | ||
| 42 | export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}" | ||
| 43 | export F77 = "${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}" | ||
| 44 | export CPP = "${HOST_PREFIX}gcc -E" | ||
| 45 | export LD = "${HOST_PREFIX}ld" | ||
| 46 | export CCLD = "${CC}" | ||
| 47 | export AR = "${HOST_PREFIX}ar" | ||
| 48 | export AS = "${HOST_PREFIX}as" | ||
| 49 | export RANLIB = "${HOST_PREFIX}ranlib" | ||
| 50 | export STRIP = "${HOST_PREFIX}strip" | ||
| 51 | |||
| 52 | |||
| 39 | # Path prefixes | 53 | # Path prefixes |
| 40 | base_prefix = "${exec_prefix}" | 54 | base_prefix = "${exec_prefix}" |
| 41 | prefix = "${STAGING_DIR}" | 55 | prefix = "${STAGING_DIR}" |
diff --git a/openembedded/classes/rootfs_ipk.bbclass b/openembedded/classes/rootfs_ipk.bbclass index 2880411c31..2729503507 100644 --- a/openembedded/classes/rootfs_ipk.bbclass +++ b/openembedded/classes/rootfs_ipk.bbclass | |||
| @@ -37,7 +37,7 @@ real_do_rootfs () { | |||
| 37 | fi | 37 | fi |
| 38 | mkdir -p ${T} | 38 | mkdir -p ${T} |
| 39 | echo "src oe file:${DEPLOY_DIR_IPK}" > ${T}/ipkg.conf | 39 | echo "src oe file:${DEPLOY_DIR_IPK}" > ${T}/ipkg.conf |
| 40 | ipkgarchs="all any noarch ${TARGET_ARCH} ${IPKG_ARCHS} ${MACHINE}" | 40 | ipkgarchs="${IPKG_ARCHS}" |
| 41 | priority=1 | 41 | priority=1 |
| 42 | for arch in $ipkgarchs; do | 42 | for arch in $ipkgarchs; do |
| 43 | echo "arch $arch $priority" >> ${T}/ipkg.conf | 43 | echo "arch $arch $priority" >> ${T}/ipkg.conf |
diff --git a/openembedded/classes/sanity.bbclass b/openembedded/classes/sanity.bbclass index 8253b27930..a626162ffb 100644 --- a/openembedded/classes/sanity.bbclass +++ b/openembedded/classes/sanity.bbclass | |||
| @@ -4,7 +4,11 @@ | |||
| 4 | 4 | ||
| 5 | def raise_sanity_error(msg): | 5 | def raise_sanity_error(msg): |
| 6 | import bb | 6 | import bb |
| 7 | 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) | 7 | bb.fatal(""" Openembedded's config sanity checker detected a potential misconfiguration. |
| 8 | Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). | ||
| 9 | Following is the list of potential problems / advisories: | ||
| 10 | |||
| 11 | %s""" % msg) | ||
| 8 | 12 | ||
| 9 | def check_conf_exists(fn, data): | 13 | def check_conf_exists(fn, data): |
| 10 | import bb, os | 14 | import bb, os |
| @@ -31,7 +35,10 @@ def check_app_exists(app, d): | |||
| 31 | def check_sanity(e): | 35 | def check_sanity(e): |
| 32 | from bb import note, error, data, __version__ | 36 | from bb import note, error, data, __version__ |
| 33 | from bb.event import Handled, NotHandled, getName | 37 | from bb.event import Handled, NotHandled, getName |
| 34 | from distutils.version import LooseVersion | 38 | try: |
| 39 | from distutils.version import LooseVersion | ||
| 40 | except ImportError: | ||
| 41 | def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1 | ||
| 35 | import os | 42 | import os |
| 36 | 43 | ||
| 37 | # Check the bitbake version meets minimum requirements | 44 | # Check the bitbake version meets minimum requirements |
| @@ -83,6 +90,12 @@ def check_sanity(e): | |||
| 83 | if not check_app_exists('texi2html', e.data): | 90 | if not check_app_exists('texi2html', e.data): |
| 84 | raise_sanity_error('Please install the texi2html binary') | 91 | raise_sanity_error('Please install the texi2html binary') |
| 85 | 92 | ||
| 93 | if not check_app_exists('cvs', e.data): | ||
| 94 | raise_sanity_error('Please install the cvs utility') | ||
| 95 | |||
| 96 | if not check_app_exists('svn', e.data): | ||
| 97 | raise_sanity_error('Please install the svn utility') | ||
| 98 | |||
| 86 | oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True ) | 99 | oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True ) |
| 87 | if not oes_bb_conf: | 100 | if not oes_bb_conf: |
| 88 | raise_sanity_error('You do not include OpenEmbeddeds version of conf/bitbake.conf') | 101 | 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 f9243f7108..6e10d0f34b 100644 --- a/openembedded/classes/tinderclient.bbclass +++ b/openembedded/classes/tinderclient.bbclass | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | def tinder_http_post(server, selector, content_type, body): | ||
| 2 | import httplib | ||
| 3 | # now post it | ||
| 4 | for i in range(0,5): | ||
| 5 | try: | ||
| 6 | h = httplib.HTTP(server) | ||
| 7 | h.putrequest('POST', selector) | ||
| 8 | h.putheader('content-type', content_type) | ||
| 9 | h.putheader('content-length', str(len(body))) | ||
| 10 | h.endheaders() | ||
| 11 | h.send(body) | ||
| 12 | errcode, errmsg, headers = h.getreply() | ||
| 13 | #print errcode, errmsg, headers | ||
| 14 | return (errcode,errmsg, headers, h.file) | ||
| 15 | except: | ||
| 16 | # try again | ||
| 17 | pass | ||
| 18 | |||
| 1 | def tinder_form_data(bound, dict, log): | 19 | def tinder_form_data(bound, dict, log): |
| 2 | output = [] | 20 | output = [] |
| 3 | #br | 21 | #br |
| @@ -29,7 +47,7 @@ def tinder_format_http_post(d,status,log): | |||
| 29 | for the tinderbox to be happy. | 47 | for the tinderbox to be happy. |
| 30 | """ | 48 | """ |
| 31 | 49 | ||
| 32 | from bb import data | 50 | from bb import data, build |
| 33 | import os,random | 51 | import os,random |
| 34 | 52 | ||
| 35 | # the variables we will need to send on this form post | 53 | # the variables we will need to send on this form post |
| @@ -72,7 +90,6 @@ def tinder_build_start(d): | |||
| 72 | on the server. | 90 | on the server. |
| 73 | """ | 91 | """ |
| 74 | from bb import data | 92 | from bb import data |
| 75 | import httplib | ||
| 76 | 93 | ||
| 77 | # get the body and type | 94 | # get the body and type |
| 78 | content_type, body = tinder_format_http_post(d,None,None) | 95 | content_type, body = tinder_format_http_post(d,None,None) |
| @@ -84,15 +101,9 @@ def tinder_build_start(d): | |||
| 84 | #print "selector %s and url %s" % (selector, url) | 101 | #print "selector %s and url %s" % (selector, url) |
| 85 | 102 | ||
| 86 | # now post it | 103 | # now post it |
| 87 | h = httplib.HTTP(server) | 104 | errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body) |
| 88 | h.putrequest('POST', selector) | ||
| 89 | h.putheader('content-type', content_type) | ||
| 90 | h.putheader('content-length', str(len(body))) | ||
| 91 | h.endheaders() | ||
| 92 | h.send(body) | ||
| 93 | errcode, errmsg, headers = h.getreply() | ||
| 94 | #print errcode, errmsg, headers | 105 | #print errcode, errmsg, headers |
| 95 | report = h.file.read() | 106 | report = h_file.read() |
| 96 | 107 | ||
| 97 | # now let us find the machine id that was assigned to us | 108 | # now let us find the machine id that was assigned to us |
| 98 | search = "<machine id='" | 109 | search = "<machine id='" |
| @@ -113,7 +124,6 @@ def tinder_send_http(d, status, log): | |||
| 113 | Send this log as build status | 124 | Send this log as build status |
| 114 | """ | 125 | """ |
| 115 | from bb import data | 126 | from bb import data |
| 116 | import httplib | ||
| 117 | 127 | ||
| 118 | 128 | ||
| 119 | # get the body and type | 129 | # get the body and type |
| @@ -124,13 +134,7 @@ def tinder_send_http(d, status, log): | |||
| 124 | selector = url + "/xml/build_status.pl" | 134 | selector = url + "/xml/build_status.pl" |
| 125 | 135 | ||
| 126 | # now post it | 136 | # now post it |
| 127 | h = httplib.HTTP(server) | 137 | errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body) |
| 128 | h.putrequest('POST', selector) | ||
| 129 | h.putheader('content-type', content_type) | ||
| 130 | h.putheader('content-length', str(len(body))) | ||
| 131 | h.endheaders() | ||
| 132 | h.send(body) | ||
| 133 | errcode, errmsg, headers = h.getreply() | ||
| 134 | #print errcode, errmsg, headers | 138 | #print errcode, errmsg, headers |
| 135 | #print h.file.read() | 139 | #print h.file.read() |
| 136 | 140 | ||
| @@ -247,7 +251,7 @@ def tinder_do_tinder_report(event): | |||
| 247 | implemented yet. | 251 | implemented yet. |
| 248 | """ | 252 | """ |
| 249 | from bb.event import getName | 253 | from bb.event import getName |
| 250 | from bb import data, mkdirhier | 254 | from bb import data, mkdirhier, build |
| 251 | import os, glob | 255 | import os, glob |
| 252 | 256 | ||
| 253 | # variables | 257 | # variables |
| @@ -289,6 +293,7 @@ def tinder_do_tinder_report(event): | |||
| 289 | elif name == "PkgSucceeded": | 293 | elif name == "PkgSucceeded": |
| 290 | log += "<--- TINDERBOX Package %s done (SUCCESS)\n" % data.getVar('P', event.data, True) | 294 | log += "<--- TINDERBOX Package %s done (SUCCESS)\n" % data.getVar('P', event.data, True) |
| 291 | elif name == "PkgFailed": | 295 | elif name == "PkgFailed": |
| 296 | build.exec_task('do_clean', event.data) | ||
| 292 | log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % data.getVar('P', event.data, True) | 297 | log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % data.getVar('P', event.data, True) |
| 293 | status = 200 | 298 | status = 200 |
| 294 | elif name == "BuildCompleted": | 299 | elif name == "BuildCompleted": |
