From 834056262ab80282aafcb5c7678af09f0e4e1d28 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sat, 19 Aug 2006 09:39:42 +0000 Subject: classes/tinderclient.bbclass: Send PF instead of only P As requested by Marcin include the PR of the built package as well. This is already included in the PF variable. --- classes/tinderclient.bbclass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'classes') diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass index 1c8079ebc9..d36ef0b343 100644 --- a/classes/tinderclient.bbclass +++ b/classes/tinderclient.bbclass @@ -240,8 +240,8 @@ def tinder_tinder_start(d, event): output.append( "---> TINDERBOX BUILDING '%(packages)s'" ) output.append( "<--- TINDERBOX STARTING BUILD NOW" ) - output.append( "" ) - + output.append( "" ) + return "\n".join(output) % vars() def tinder_do_tinder_report(event): @@ -311,13 +311,13 @@ def tinder_do_tinder_report(event): elif name == "TaskFailed": log += "<--- TINDERBOX Task %s failed (FAILURE)\n" % event.task elif name == "PkgStarted": - log += "---> TINDERBOX Package %s started\n" % data.getVar('P', event.data, True) + log += "---> TINDERBOX Package %s started\n" % data.getVar('PF', event.data, True) elif name == "PkgSucceeded": - log += "<--- TINDERBOX Package %s done (SUCCESS)\n" % data.getVar('P', event.data, True) + log += "<--- TINDERBOX Package %s done (SUCCESS)\n" % data.getVar('PF', event.data, True) elif name == "PkgFailed": if not data.getVar('TINDER_AUTOBUILD', event.data, True) == "0": build.exec_task('do_clean', event.data) - log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % data.getVar('P', event.data, True) + log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % data.getVar('PF', event.data, True) status = 200 # remember the failure for the -k case h = file(data.getVar('TMPDIR', event.data, True)+"/tinder-status", 'w') -- cgit v1.2.3 From 314d42583035aaf4bb5dfe7ff948875752739d3b Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sat, 19 Aug 2006 09:52:40 +0000 Subject: classes/icecc.bbclass: Remove tabs, use inherit_class to check if we build a native or cross package --- classes/icecc.bbclass | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) (limited to 'classes') diff --git a/classes/icecc.bbclass b/classes/icecc.bbclass index 7dfcfc29a4..656cbe9d69 100644 --- a/classes/icecc.bbclass +++ b/classes/icecc.bbclass @@ -1,5 +1,5 @@ # IceCream distributed compiling support -# +# # We need to create a tar.bz2 of our toolchain and set # ICECC_VERSION, ICECC_CXX and ICEC_CC # @@ -13,7 +13,7 @@ def create_env(bb,d): # host prefix is empty (let us duplicate the query for ease) prefix = bb.data.expand('${HOST_PREFIX}', d) if len(prefix) == 0: - return "" + return "" import tarfile import socket @@ -28,12 +28,12 @@ def create_env(bb,d): name = socket.gethostname() try: - os.stat(ice_dir + '/' + target_sys + '/lib/ld-linux.so.2') - os.stat(ice_dir + '/' + target_sys + '/bin/g++') + os.stat(ice_dir + '/' + target_sys + '/lib/ld-linux.so.2') + os.stat(ice_dir + '/' + target_sys + '/bin/g++') except: - return "" + return "" - VERSION = '3.4.3' + VERSION = '3.4.3' cross_name = prefix + distro + target_sys + float +VERSION+ name tar_file = ice_dir + '/ice/' + cross_name + '.tar.bz2' @@ -41,10 +41,10 @@ def create_env(bb,d): os.stat(tar_file) return tar_file except: - try: - os.makedirs(ice_dir+'/ice') - except: - pass + try: + os.makedirs(ice_dir+'/ice') + except: + pass # FIXME find out the version of the compiler tar = tarfile.open(tar_file, 'w:bz2') @@ -102,15 +102,14 @@ def use_icc_version(bb,d): # Constin native native prefix = bb.data.expand('${HOST_PREFIX}', d) if len(prefix) == 0: - return "no" - - - native = bb.data.expand('${PN}', d) - blacklist = [ "-cross", "-native" ] + return "no" + + + blacklist = [ "cross", "native" ] for black in blacklist: - if black in native: - return "no" + if bb.data.inherits_class(black, d): + return "no" return "yes" @@ -118,13 +117,13 @@ def icc_path(bb,d,compile): native = bb.data.expand('${PN}', d) blacklist = [ "ulibc", "glibc", "ncurses" ] for black in blacklist: - if black in native: - return "" + if black in native: + return "" - if "-native" in native: - compile = False - if "-cross" in native: - compile = False + blacklist = [ "cross", "native" ] + for black in blacklist: + if bb.data.inherits_class(black, d): + compile = False prefix = bb.data.expand('${HOST_PREFIX}', d) if compile and len(prefix) != 0: @@ -151,6 +150,6 @@ do_compile_prepend() { export ICECC_CXX="${HOST_PREFIX}g++" if [ "${@use_icc_version(bb,d)}" = "yes" ]; then - export ICECC_VERSION="${@icc_version(bb,d)}" + export ICECC_VERSION="${@icc_version(bb,d)}" fi } -- cgit v1.2.3 From 821494d376ae549d48182380b8d4b5d92c913524 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sat, 19 Aug 2006 10:20:59 +0000 Subject: classes/icecc.bbclass: Determine version of gcc by executing it, use os.path.join to create paths --- classes/icecc.bbclass | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'classes') diff --git a/classes/icecc.bbclass b/classes/icecc.bbclass index 656cbe9d69..658ccf3672 100644 --- a/classes/icecc.bbclass +++ b/classes/icecc.bbclass @@ -4,6 +4,14 @@ # ICECC_VERSION, ICECC_CXX and ICEC_CC # +def icc_determine_gcc_version(gcc): + """ + Hack to determine the version of GCC + + 'i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5363)' + """ + return os.popen("%s --version" % gcc ).readline()[2] + def create_env(bb,d): """ Create a tar.bz of the current toolchain @@ -23,32 +31,31 @@ def create_env(bb,d): prefix = bb.data.expand('${HOST_PREFIX}' , d) distro = bb.data.expand('${DISTRO}', d) target_sys = bb.data.expand('${TARGET_SYS}', d) - #float = bb.data.getVar('${TARGET_FPU}', d) - float = "anyfloat" + float = bb.data.getVar('${TARGET_FPU}', d) or "hard" name = socket.gethostname() try: - os.stat(ice_dir + '/' + target_sys + '/lib/ld-linux.so.2') - os.stat(ice_dir + '/' + target_sys + '/bin/g++') + os.stat(os.path.join(ice_dir, target_sys, 'lib', 'ld-linux.so.2')) + os.stat(os.path.join(ice_dir, target_sys, 'bin', 'g++')) except: return "" - VERSION = '3.4.3' + VERSION = icc_determine_gcc_version( os.path.join(ice_dir,target_sys,"bin","g++") ) cross_name = prefix + distro + target_sys + float +VERSION+ name - tar_file = ice_dir + '/ice/' + cross_name + '.tar.bz2' + tar_file = os.path.join(ice_dir, 'ice', cross_name + '.tar.bz2') try: os.stat(tar_file) return tar_file except: try: - os.makedirs(ice_dir+'/ice') + os.makedirs(os.path.join(ice_dir,'ice')) except: pass # FIXME find out the version of the compiler tar = tarfile.open(tar_file, 'w:bz2') - tar.add(ice_dir + '/' + target_sys + '/lib/ld-linux.so.2', + tar.add(ice_dir + '/' + target_sys + '/lib/ld-linux.so.2', target_sys + 'cross/lib/ld-linux.so.2') tar.add(ice_dir + '/' + target_sys + '/lib/ld-linux.so.2', target_sys + 'cross/lib/ld-2.3.3.so') @@ -78,7 +85,7 @@ def create_path(compilers, type, bb, d): """ import os - staging = bb.data.expand('${STAGING_DIR}', d) + "/ice/" + type + staging = os.path.join(bb.data.expand('${STAGING_DIR}', d), "ice", type) icecc = bb.data.getVar('ICECC_PATH', d) # Create the dir if necessary @@ -89,7 +96,7 @@ def create_path(compilers, type, bb, d): for compiler in compilers: - gcc_path = staging + "/" + compiler + gcc_path = os.path.join(staging, compiler) try: os.stat(gcc_path) except: -- cgit v1.2.3 From b36de12b97e17d1d8cee26e91d97ae9951b59d52 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sun, 20 Aug 2006 21:27:22 +0000 Subject: classes/icecc.bbclass: Simplify, improve code creating a tar.bz2 For icecream we need to package a tar.bz2 containing our used toolchain. It must contain a gcc, g++ and cc1 and cc1plus and a spec file (if it is not built-in). Optionally it contains host libc.so and libfd.so (which we do not package). Simplify the code creating the tar.bz2 and make it work with any version of gcc/glibc/uclibc (untested). --- classes/icecc.bbclass | 56 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 20 deletions(-) (limited to 'classes') diff --git a/classes/icecc.bbclass b/classes/icecc.bbclass index 658ccf3672..66a5bf79e3 100644 --- a/classes/icecc.bbclass +++ b/classes/icecc.bbclass @@ -34,6 +34,8 @@ def create_env(bb,d): float = bb.data.getVar('${TARGET_FPU}', d) or "hard" name = socket.gethostname() + # Stupid check to determine if we have built a libc and a cross + # compiler. try: os.stat(os.path.join(ice_dir, target_sys, 'lib', 'ld-linux.so.2')) os.stat(os.path.join(ice_dir, target_sys, 'bin', 'g++')) @@ -54,27 +56,41 @@ def create_env(bb,d): pass # FIXME find out the version of the compiler + # Consider using -print-prog-name={cc1,cc1plus} + # and -print-file-name=specs + + # We will use the GCC to tell us which tools to use + # What we need is: + # -gcc + # -g++ + # -as + # -cc1 + # -cc1plus + # and we add them to /usr/bin + tar = tarfile.open(tar_file, 'w:bz2') - tar.add(ice_dir + '/' + target_sys + '/lib/ld-linux.so.2', - target_sys + 'cross/lib/ld-linux.so.2') - tar.add(ice_dir + '/' + target_sys + '/lib/ld-linux.so.2', - target_sys + 'cross/lib/ld-2.3.3.so') - tar.add(ice_dir + '/' + target_sys + '/lib/libc-2.3.3.so', - target_sys + 'cross/lib/libc-2.3.3.so') - tar.add(ice_dir + '/' + target_sys + '/lib/libc.so.6', - target_sys + 'cross/lib/libc.so.6') - tar.add(ice_dir + '/' + target_sys + '/bin/gcc', - target_sys + 'cross/usr/bin/gcc') - tar.add(ice_dir + '/' + target_sys + '/bin/g++', - target_sys + 'cross/usr/bin/g++') - tar.add(ice_dir + '/' + target_sys + '/bin/as', - target_sys + 'cross/usr/bin/as') - tar.add(ice_dir + '/lib/gcc/' + target_sys +'/'+ VERSION + '/specs', - target_sys+'cross/usr/lib/gcc/'+target_sys+'/'+VERSION+'/lib/specs') - tar.add(ice_dir + '/libexec/gcc/'+target_sys+'/' + VERSION + '/cc1', - target_sys + 'cross/usr/lib/gcc/'+target_sys+'/'+VERSION+'/lib/cc1') - tar.add(ice_dir + '/libexec/gcc/arm-linux/' + VERSION + '/cc1plus', - target_sys+'cross/usr/lib/gcc/'+target_sys+'/'+VERSION+'/lib/cc1plus') + + # Now add the required files + tar.add(os.path.join(ice_dir,target_sys,'bin','gcc'), + os.path.join("usr","bin","gcc") ) + tar.add(os.path.join(ice_dir,target_sys,'bin','g++'), + os.path.join("usr","bin","g++") ) + tar.add(os.path.join(ice_dir,target_sys,'bin','as'), + os.path.join("usr","bin","as") ) + + # Now let us find cc1 and cc1plus + cc1 = os.popen("%s -print-prog-name=cc1" % data.getVar('CC', d, True)).read()[:-1] + cc1plus = os.popen("%s -print-prog-name=cc1plus" % data.getVar('CC', d, True)).read()[:-1] + spec = os.popen("%s -print-file-name=specs" % data.getVar('CC', d, True)).read()[:-1] + + # CC1 and CC1PLUS should be there... + tar.add(cc1, os.path.join('usr', 'bin', 'cc1')) + tar.add(cc1plus, os.path.join('usr', 'bin', 'cc1plus')) + + # spec - if it exists + if os.path.exists(spec): + tar.add(spec) + tar.close() return tar_file -- cgit v1.2.3 From eeb54f606de6ef294b91394df97da3b0f90bdefc Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 20 Aug 2006 22:04:16 +0000 Subject: multimachine.bbclass: Should use TARGET_OS, not HOST_OS --- classes/multimachine.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/multimachine.bbclass b/classes/multimachine.bbclass index 2248f326cc..01dec648c3 100644 --- a/classes/multimachine.bbclass +++ b/classes/multimachine.bbclass @@ -1,6 +1,6 @@ -STAMP = "${TMPDIR}/stamps/${MULTIMACH_ARCH}-${HOST_OS}/${PF}" -WORKDIR = "${TMPDIR}/work/${MULTIMACH_ARCH}-${HOST_OS}/${PF}" -STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_ARCH}-${HOST_OS}/kernel" +STAMP = "${TMPDIR}/stamps/${MULTIMACH_ARCH}-${TARGET_OS}/${PF}" +WORKDIR = "${TMPDIR}/work/${MULTIMACH_ARCH}-${TARGET_OS}/${PF}" +STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_ARCH}-${TARGET_OS}/kernel" # Find any machine specific sub packages and if present, mark the # whole package as machine specific for multimachine purposes. -- cgit v1.2.3 From 959a8d0369208ec82a46f14e265dd8ab58668ef9 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 20 Aug 2006 22:07:17 +0000 Subject: classes: Add task dependencies expressions, as required for the new multithreading version of bitbake. Also, set BB_DEFAULT_TASK to specify the default task (build) rather than hardcode into bitbake. --- classes/base.bbclass | 2 ++ classes/debian.bbclass | 4 ++++ classes/image_ipk.bbclass | 3 ++- classes/package.bbclass | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index e36c3e3aa3..7e526e17da 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -1,3 +1,4 @@ +BB_DEFAULT_TASK = "build" PATCHES_DIR="${S}" def base_dep_prepend(d): @@ -584,6 +585,7 @@ python base_eventhandler() { addtask configure after do_unpack do_patch do_configure[dirs] = "${S} ${B}" do_configure[bbdepcmd] = "do_populate_staging" +do_configure[deptask] = "do_populate_staging" base_do_configure() { : } diff --git a/classes/debian.bbclass b/classes/debian.bbclass index 5688dad93b..698d917b51 100644 --- a/classes/debian.bbclass +++ b/classes/debian.bbclass @@ -6,6 +6,10 @@ STAGING_PKGMAPS_DIR = "${STAGING_DIR}/pkgmaps/debian" # depends are correct BUILD_ALL_DEPS = "1" +# Better expressed as ensure all RDEPENDS package before we package +# This means we can't have circular RDEPENDS/RRECOMMENDS +do_package[rdeptask] = "do_package" + python debian_package_name_hook () { import glob, copy, stat, errno, re diff --git a/classes/image_ipk.bbclass b/classes/image_ipk.bbclass index d3923f06a2..83e9acf315 100644 --- a/classes/image_ipk.bbclass +++ b/classes/image_ipk.bbclass @@ -1,7 +1,8 @@ inherit rootfs_ipk -# We need to follow RDEPENDS and RRECOMMENDS for images +# We need to recursively follow RDEPENDS and RRECOMMENDS for images BUILD_ALL_DEPS = "1" +do_rootfs[recrdeptask] = "do_package" # Images are generally built explicitly, do not need to be part of world. EXCLUDE_FROM_WORLD = "1" diff --git a/classes/package.bbclass b/classes/package.bbclass index 2791e4bcfa..0d6a7734af 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -734,6 +734,8 @@ python package_do_package () { } do_package[dirs] = "${D}" +# shlibs requires any DEPENDS to have already packaged for the *.list files +do_package[deptask] = "do_package" populate_packages[dirs] = "${D}" EXPORT_FUNCTIONS do_package do_shlibs do_split_locales mapping_rename_hook addtask package before do_build after do_populate_staging -- cgit v1.2.3 From 1ddd28e44a093f410201d8c6bbe91a85aaa4470a Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 22 Aug 2006 09:31:58 +0000 Subject: base.bbclass: remove nostamp for fetch * this will force a full rebuild, so have some coffee + cookies ready --- classes/base.bbclass | 1 - 1 file changed, 1 deletion(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 7e526e17da..56a13ff309 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -324,7 +324,6 @@ python base_do_mrproper() { addtask fetch do_fetch[dirs] = "${DL_DIR}" -do_fetch[nostamp] = "1" python base_do_fetch() { import sys -- cgit v1.2.3 From f4b18fced24ea7704b429db86f7638a779079407 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 23 Aug 2006 12:29:20 +0000 Subject: base.bbclass: Remove empty messages --- classes/base.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 56a13ff309..6f8468b119 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -543,7 +543,8 @@ python base_eventhandler() { msg += messages.get(name[5:]) or name[5:] elif name == "UnsatisfiedDep": msg += "package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower()) - note(msg) + if msg: + note(msg) if name.startswith("BuildStarted"): bb.data.setVar( 'BB_VERSION', bb.__version__, e.data ) -- cgit v1.2.3