diff options
| author | Matt Reimer <mattjreimer@gmail.com> | 2006-11-06 18:29:44 +0000 |
|---|---|---|
| committer | Matt Reimer <mattjreimer@gmail.com> | 2006-11-06 18:29:44 +0000 |
| commit | 2b622239c20657486f9e84842fd392f0a03c4598 (patch) | |
| tree | 6b0f2058023f53c03ef7a0419eb06af11e8ba47f /classes | |
| parent | 5f7acfb7fa919640d4b9e3a997ff4ddfc5a39569 (diff) | |
| parent | e37ddf6842faf9b3421fa4ab688944a20f0bba94 (diff) | |
merge of '41daabd524e84d8b355abb1ef7c1d06479c25b7d'
and '749aa1340946e929e3de2422cb6c275ee1ae34ba'
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/binconfig.bbclass | 23 | ||||
| -rw-r--r-- | classes/devshell.bbclass | 13 | ||||
| -rw-r--r-- | classes/insane.bbclass | 6 | ||||
| -rw-r--r-- | classes/nylon-image.bbclass | 11 | ||||
| -rw-r--r-- | classes/rootfs_ipk.bbclass | 2 | ||||
| -rw-r--r-- | classes/sanity.bbclass | 35 |
6 files changed, 72 insertions, 18 deletions
diff --git a/classes/binconfig.bbclass b/classes/binconfig.bbclass index 34021845ee..317e080fc5 100644 --- a/classes/binconfig.bbclass +++ b/classes/binconfig.bbclass @@ -27,6 +27,29 @@ def is_native(d): BINCONFIG_GLOB ?= "*-config" +do_install_append() { + + #the 'if' protects native packages, since we can't easily check for bb.data.inherits_class('native', d) in shell + if [ -e ${D}${bindir} ] ; then + for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do + cat $config | sed \ + -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ + -e 's:${STAGING_INCDIR}:${includedir}:g;' \ + -e 's:${STAGING_DATADIR}:${datadir}:' \ + -e 's:${STAGING_LIBDIR}/..:${prefix}:' > ${D}${bindir}/`basename $config` + done + fi + + for lafile in `find ${D} -name *.la` ; do + sed -i \ + -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ + -e 's:${STAGING_INCDIR}:${includedir}:g;' \ + -e 's:${STAGING_DATADIR}:${datadir}:' \ + -e 's:${STAGING_LIBDIR}/..:${prefix}:' \ + $lafile + done +} + do_stage_append() { for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do configname=`basename $config`${@is_native(d)} diff --git a/classes/devshell.bbclass b/classes/devshell.bbclass new file mode 100644 index 0000000000..118e5e4a2a --- /dev/null +++ b/classes/devshell.bbclass @@ -0,0 +1,13 @@ +EXTRA_OEMAKE[export] = 1 + +do_devshell[dirs] = "${S}" +do_devshell[nostamp] = 1 +do_devshell[interactive] = 1 +devshell_do_devshell() { + bash -i +} +addtask devshell after do_patch + + +EXPORT_FUNCTIONS do_devshell + diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 75602d0f44..4ff867b62f 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -8,7 +8,7 @@ # -Check the RUNTIME path for the $TMPDIR # -Check if .la files wrongly point to workdir # -Check if .pc files wrongly point to workdir -# -Check if packages contains .dbg or .so files where they should be in -dev or -dbg +# -Check if packages contains .debug directories or .so files where they should be in -dev or -dbg # @@ -55,7 +55,7 @@ def package_qa_check_devdbg(path, name,d): if not "-dbg" in name: if '.debug' in path: - bb.error("QA Issue: non debug package contains .dbg file: %s" % name) + bb.error("QA Issue: non debug package contains .debug directory: %s" % name) def package_qa_check_perm(path,name,d): """ @@ -126,7 +126,7 @@ def package_qa_check_rdepends(pkg, workdir, d): # The PACKAGE FUNC to scan each package python do_package_qa () { bb.note("DO PACKAGE QA") - workdir = bb.data.getVar('WORKDIR', d, True) + workdir = bb.data.getVar('WORKDIR', d, True) packages = bb.data.getVar('PACKAGES',d, True) # no packages should be scanned diff --git a/classes/nylon-image.bbclass b/classes/nylon-image.bbclass index 8517c033e9..e24aa33cf4 100644 --- a/classes/nylon-image.bbclass +++ b/classes/nylon-image.bbclass @@ -1,5 +1,5 @@ # we dont need the kernel in the image -ROOTFS_POSTPROCESS_COMMAND = "rm -f ${IMAGE_ROOTFS}/tmp/zImage*" +ROOTFS_POSTPROCESS_COMMAND = "rm -f ${IMAGE_ROOTFS}/tmp/*Image*" # create a tar.gz (.imgz) file containing the filesystem and the kernel nylon_create_imgz() { @@ -7,8 +7,15 @@ nylon_create_imgz() { rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.imgz install -d ${DEPLOY_DIR_IMAGE}/tmp - cp ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}.flash.bin ${DEPLOY_DIR_IMAGE}/tmp/zImage.flash + # copy the kernel (for mips on flash) into tmp + FLASH_BIN=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}.flash.bin + test -f ${FLASH_BIN} && \ + cp ${FLASH_BIN} ${DEPLOY_DIR_IMAGE}/tmp/zImage.flash + + # copy rootfs.jffs (or so) into tmp cp ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/tmp/rootfs.${type} + + # make an imgz out of tmp ( cd ${DEPLOY_DIR_IMAGE}/tmp; tar cvzf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.imgz * ) rm -r ${DEPLOY_DIR_IMAGE}/tmp } diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass index 8cea393b43..eeb3f75e11 100644 --- a/classes/rootfs_ipk.bbclass +++ b/classes/rootfs_ipk.bbclass @@ -98,7 +98,7 @@ log_check() { for keyword_die in "Cannot find package" "exit 1" ERR Fail do - if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") &>/dev/null + if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1 then echo "log_check: There were error messages in the logfile" echo -e "log_check: Matched keyword: [$keyword_die]\n" diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index 64c1bc0a0c..958ab91fa6 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -49,48 +49,59 @@ def check_sanity(e): print "Foo %s" % minversion return + messages = "" + if (LooseVersion(__version__) < LooseVersion(minversion)): - raise_sanity_error('Bitbake version %s is required and version %s was found' % (minversion, __version__)) + messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__) # Check TARGET_ARCH is set if data.getVar('TARGET_ARCH', e.data, True) == 'INVALID': - raise_sanity_error('Please set TARGET_ARCH directly, or choose a MACHINE or DISTRO that does so.') + messages = messages + 'Please set TARGET_ARCH directly, or choose a MACHINE or DISTRO that does so.\n' # Check TARGET_OS is set if data.getVar('TARGET_OS', e.data, True) == 'INVALID': - raise_sanity_error('Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.') + messages = messages + 'Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.\n' # Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf if "diffstat-native" not in data.getVar('ASSUME_PROVIDED', e.data, True).split(): - raise_sanity_error('Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf') + messages = messages + 'Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n' # Check that the MACHINE is valid if not check_conf_exists("conf/machine/${MACHINE}.conf", e.data): - raise_sanity_error('Please set a valid MACHINE in your local.conf') + messages = messages + 'Please set a valid MACHINE in your local.conf\n' # Check that the DISTRO is valid # need to take into account DISTRO renaming DISTRO if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ): - raise_sanity_error("DISTRO '%s' not found. Please set a valid DISTRO in your local.conf" % data.getVar("DISTRO", e.data, True )) + messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", e.data, True ) + + missing = "" if not check_app_exists("${MAKE}", e.data): - raise_sanity_error('GNU make missing. Please install GNU make') + missing = missing + "GNU make," if not check_app_exists('${BUILD_PREFIX}gcc', e.data): - raise_sanity_error('C Host-Compiler is missing, please install one' ) + missing = missing + "C Compiler (${BUILD_PREFIX}gcc)," if not check_app_exists('${BUILD_PREFIX}g++', e.data): - raise_sanity_error('C++ Host-Compiler is missing, please install one' ) + missing = missing + "C++ Compiler (${BUILD_PREFIX}g++)," - required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip" + required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk" for util in required_utilities.split(): if not check_app_exists( util, e.data ): - raise_sanity_error( "Please install the %s utility." % util ) + missing = missing + "%s," % util + + if missing != "": + missing = missing.rstrip(',') + messages = messages + "Please install following missing utilities: %s\n" % missing 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') + messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf\n' + + if messages != "": + raise_sanity_error(messages) addhandler check_sanity_eventhandler python check_sanity_eventhandler() { |
