diff options
| author | Sergey Lapin <slapin@ossfans.org> | 2009-09-04 13:27:50 +0400 |
|---|---|---|
| committer | Sergey Lapin <slapin@ossfans.org> | 2009-09-04 13:27:50 +0400 |
| commit | 43653cf44fc541bd55cb094392444a7faa7bb3be (patch) | |
| tree | e7e3e129d04e8bed53c2ced0e3f9fbd7ceec099a /classes | |
| parent | 5d87cec7a3e962afb7cfa621d172abc3effc085d (diff) | |
| parent | c26fc5db90702b035bd545cff3ee7575a0f9b70f (diff) | |
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/base.bbclass | 31 | ||||
| -rw-r--r-- | classes/clean.bbclass | 53 | ||||
| -rw-r--r-- | classes/devshell.bbclass | 3 | ||||
| -rw-r--r-- | classes/distutils-common-base.bbclass | 4 | ||||
| -rw-r--r-- | classes/gconf.bbclass | 7 | ||||
| -rw-r--r-- | classes/gitver.bbclass | 54 | ||||
| -rw-r--r-- | classes/glx-use-tls.bbclass | 7 | ||||
| -rw-r--r-- | classes/gnome.bbclass | 1 | ||||
| -rw-r--r-- | classes/image.bbclass | 4 | ||||
| -rw-r--r-- | classes/insane.bbclass | 2 | ||||
| -rw-r--r-- | classes/kernel.bbclass | 19 | ||||
| -rw-r--r-- | classes/package.bbclass | 45 | ||||
| -rw-r--r-- | classes/package_deb.bbclass | 7 | ||||
| -rw-r--r-- | classes/package_ipk.bbclass | 7 | ||||
| -rw-r--r-- | classes/package_rpm.bbclass | 4 | ||||
| -rw-r--r-- | classes/package_tar.bbclass | 2 | ||||
| -rw-r--r-- | classes/patch.bbclass | 20 | ||||
| -rw-r--r-- | classes/qmake_base.bbclass | 2 | ||||
| -rw-r--r-- | classes/sanity.bbclass | 2 | ||||
| -rw-r--r-- | classes/siteinfo.bbclass | 22 | ||||
| -rw-r--r-- | classes/src_distribute.bbclass | 43 | ||||
| -rw-r--r-- | classes/src_distribute_local.bbclass | 58 | ||||
| -rw-r--r-- | classes/srctree.bbclass | 115 | ||||
| -rw-r--r-- | classes/task-metadata-track.bbclass | 96 | ||||
| -rw-r--r-- | classes/vala.bbclass | 13 |
25 files changed, 556 insertions, 65 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index ef6c0abf8f..d29ba4bfcf 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -84,7 +84,7 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, data): # call md5(sum) and shasum try: - md5pipe = os.popen('md5sum ' + localpath) + md5pipe = os.popen('PATH=%s md5sum %s' % (bb.data.getVar('PATH', data, True), localpath)) md5data = (md5pipe.readline().split() or [ "" ])[0] md5pipe.close() except OSError: @@ -159,6 +159,12 @@ def base_read_file(filename): return f.read().strip() return None +def base_ifelse(condition, iftrue = True, iffalse = False): + if condition: + return iftrue + else: + return iffalse + def base_conditional(variable, checkvalue, truevalue, falsevalue, d): import bb if bb.data.getVar(variable,d,1) == checkvalue: @@ -517,6 +523,12 @@ python base_do_clean() { os.system('rm -f '+ dir) } +python do_cleanall() { + pass +} +do_cleanall[recrdeptask] = "do_clean" +addtask cleanall after do_clean + #Uncomment this for bitbake 1.8.12 #addtask rebuild after do_${BB_DEFAULT_TASK} addtask rebuild @@ -614,6 +626,9 @@ python base_do_fetch() { except bb.fetch.NoMethodError: (type, value, traceback) = sys.exc_info() raise bb.build.FuncFailed("No method: %s" % value) + except bb.MalformedUrl: + (type, value, traceback) = sys.exc_info() + raise bb.build.FuncFailed("Malformed URL: %s" % value) try: bb.fetch.go(localdata) @@ -719,9 +734,14 @@ base_do_buildall() { : } +def subprocess_setup(): + import signal + # Python installs a SIGPIPE handler by default. This is usually not what + # non-Python subprocesses expect. + signal.signal(signal.SIGPIPE, signal.SIG_DFL) def oe_unpack_file(file, data, url = None): - import bb, os + import bb, os, subprocess if not url: url = "file://%s" % file dots = file.split(".") @@ -790,7 +810,7 @@ def oe_unpack_file(file, data, url = None): cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', data, 1), cmd) bb.note("Unpacking %s to %s/" % (base_path_out(file, data), base_path_out(os.getcwd(), data))) - ret = os.system(cmd) + ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True) os.chdir(save_cwd) @@ -1279,7 +1299,6 @@ ${DEBIAN_MIRROR} ftp://ftp.es.debian.org/debian/pool ${DEBIAN_MIRROR} ftp://ftp.se.debian.org/debian/pool ${DEBIAN_MIRROR} ftp://ftp.tr.debian.org/debian/pool ${GNU_MIRROR} ftp://mirrors.kernel.org/gnu -${GNU_MIRROR} ftp://ftp.matrix.com.br/pub/gnu ${GNU_MIRROR} ftp://ftp.cs.ubc.ca/mirror2/gnu ${GNU_MIRROR} ftp://sunsite.ust.hk/pub/gnu ${GNU_MIRROR} ftp://ftp.ayamura.org/pub/gnu @@ -1313,6 +1332,10 @@ ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://gd.tuwien.ac.at/utils/adm ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://the.wiretapped.net/pub/security/host-security/lsof/ http://www.apache.org/dist http://archive.apache.org/dist +ftp://.*/.* http://mirrors.openembedded.org/ +https?$://.*/.* http://mirrors.openembedded.org/ +ftp://.*/.* http://sources.openembedded.org/ +https?$://.*/.* http://sources.openembedded.org/ } diff --git a/classes/clean.bbclass b/classes/clean.bbclass new file mode 100644 index 0000000000..65c1ab5d76 --- /dev/null +++ b/classes/clean.bbclass @@ -0,0 +1,53 @@ +def clean_builddir(d): + from shutil import rmtree + + builddir = d.getVar("B", True) + srcdir = d.getVar("S", True) + if builddir != srcdir: + rmtree(builddir, ignore_errors=True) + +def clean_stamps(d): + from glob import glob + from bb import note + from bb.data import expand + from os import unlink + + note("Removing stamps") + for stamp in glob(expand('${STAMP}.*', d)): + try: + unlink(stamp) + except OSError: + pass + +def clean_workdir(d): + from shutil import rmtree + from bb import note + + workdir = d.getVar("WORKDIR", 1) + note("Removing %s" % workdir) + rmtree(workdir, ignore_errors=True) + +def clean_git(d): + from subprocess import call + + call(["git", "clean", "-d", "-f", "-X"], cwd=d.getVar("S", True)) + +def clean_make(d): + import bb + + bb.note("Running make clean") + try: + bb.build.exec_func("__do_clean_make", d) + except bb.build.FuncFailed: + pass + +__do_clean_make () { + oe_runmake clean +} + +python do_clean () { + clean_stamps(d) + clean_workdir(d) + clean_builddir(d) + clean_make(d) +} diff --git a/classes/devshell.bbclass b/classes/devshell.bbclass index 2944dbbfc2..9327b55d0a 100644 --- a/classes/devshell.bbclass +++ b/classes/devshell.bbclass @@ -4,7 +4,8 @@ do_devshell[dirs] = "${S}" do_devshell[nostamp] = "1" export DISPLAY -export XAUTHORITY +export DBUS_SESSION_BUS_ADDRESS +export XAUTHORITY ?= "${HOME}/.Xauthority" devshell_do_devshell() { export TERMWINDOWTITLE="Bitbake Developer Shell" diff --git a/classes/distutils-common-base.bbclass b/classes/distutils-common-base.bbclass index 9ca392b84a..01bf9eaeba 100644 --- a/classes/distutils-common-base.bbclass +++ b/classes/distutils-common-base.bbclass @@ -8,7 +8,9 @@ def python_dir(d): staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 ) for majmin in "2.6 2.5 2.4 2.3".split(): if os.path.exists( "%s/python%s" % ( staging_incdir, majmin ) ): return "python%s" % majmin - raise "No Python in STAGING_INCDIR. Forgot to build python-native ?" + if not "python-native" in bb.data.getVar( "DEPENDS", d, 1 ).split(): + raise "No Python in STAGING_INCDIR. Forgot to build python-native ?" + return "INVALID" PYTHON_DIR = "${@python_dir(d)}" diff --git a/classes/gconf.bbclass b/classes/gconf.bbclass index 99f33e433a..47df06329b 100644 --- a/classes/gconf.bbclass +++ b/classes/gconf.bbclass @@ -45,9 +45,10 @@ python populate_packages_append () { if schemas != []: bb.note("adding gconf postinst and prerm scripts to %s" % pkg) bb.data.setVar('SCHEMA_FILES', " ".join(schemas), d) - postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1) - if not postinst: - postinst = '#!/bin/sh\n' + postinst = '#!/bin/sh\n' + pkgpostinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1) + if pkgpostinst: + postinst += pkgpostinst postinst += bb.data.getVar('gconf_postinst', d, 1) bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) prerm = bb.data.getVar('pkg_prerm_%s' % pkg, d, 1) or bb.data.getVar('pkg_prerm', d, 1) diff --git a/classes/gitver.bbclass b/classes/gitver.bbclass new file mode 100644 index 0000000000..92c053ae24 --- /dev/null +++ b/classes/gitver.bbclass @@ -0,0 +1,54 @@ +# Copyright (C) 2009 Chris Larson <clarson@kergoth.com> +# Released under the MIT license (see COPYING.MIT for the terms) +# +# gitver.bbclass provides a GITVER variable which is a (fairly) sane version, +# for use in ${PV}, extracted from the ${S} git checkout, assuming it is one. +# This is most useful in concert with srctree.bbclass. + + +GITVER = "${@get_git_pv('${S}', d)}" + +def gitver_mark_dependency(d): + from bb.data import expand + from bb.parse import mark_dependency + from os.path import abspath + + fn = abspath(expand("${S}/.git/HEAD", d)) + mark_dependency(d, fn) + +def get_git_pv(path, d, tagadjust=None): + from subprocess import Popen, PIPE + from os.path import join + from bb import error + + env = {"GIT_DIR": join(d.getVar("S", True), ".git")} + + def popen(cmd, **kwargs): + kwargs["stderr"] = PIPE + kwargs["stdout"] = PIPE + kwargs["env"] = env + try: + pipe = Popen(cmd, **kwargs) + except OSError, e: + #error("Execution of %s failed: %s" % (cmd, e)) + return + + (stdout, stderr) = pipe.communicate(None) + if pipe.returncode != 0: + #error("Execution of %s failed: %s" % (cmd, stderr)) + return + return stdout.rstrip() + + gitver_mark_dependency(d) + + ver = popen(["git", "describe", "--tags"], cwd=path) + if not ver: + ver = popen(["git", "rev-parse", "--short", "HEAD"], cwd=path) + if ver: + return "0.0-%s" % ver + else: + return "0.0" + else: + if tagadjust: + ver = tagadjust(ver) + return ver diff --git a/classes/glx-use-tls.bbclass b/classes/glx-use-tls.bbclass new file mode 100644 index 0000000000..7530872fa4 --- /dev/null +++ b/classes/glx-use-tls.bbclass @@ -0,0 +1,7 @@ +def get_tls_setting(bb, d): + # until we have no prober TLS support in uclibc disable it + if bb.data.getVar('TARGET_OS', d, 1).find('uclibc') >= 0 : + return "" + return "--enable-glx-tls" + +EXTRA_OECONF += "${@get_tls_setting(bb, d)}" diff --git a/classes/gnome.bbclass b/classes/gnome.bbclass index da88884dde..3d04298ac6 100644 --- a/classes/gnome.bbclass +++ b/classes/gnome.bbclass @@ -23,5 +23,6 @@ gnome_stage_includes() { do_install_append() { rm -rf ${D}${localstatedir}/lib/scrollkeeper/* + rm -f ${D}${datadir}/applications/*.cache } diff --git a/classes/image.bbclass b/classes/image.bbclass index 385043bfc7..f7afbab81e 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -243,8 +243,10 @@ if [ -e ${IMAGE_ROOTFS}/usr/bin/opkg-cl ] ; then ${OPKG} list_installed | awk '{print $1}' |sort | uniq > /tmp/installed-packages for i in $(cat /tmp/installed-packages | grep -v locale) ; do - for translation in ${IMAGE_LINGUAS} $(echo ${IMAGE_LINGUAS} | awk -F_ '{print $1}'); do + for translation in ${IMAGE_LINGUAS}; do + translation_split=$(echo ${translation} | awk -F '-' '{print $1}') echo ${i}-locale-${translation} + echo ${i}-locale-${translation_split} done done | sort | uniq > /tmp/wanted-locale-packages diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 606270d62c..c41b84a4c0 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -73,7 +73,7 @@ def package_qa_get_machine_dict(): "arm" : (40, 0, 0, True, True), "armeb" : (40, 0, 0, False, True), }, - "linux-uclibcgnueabi" : { + "linux-uclibceabi" : { "arm" : (40, 0, 0, True, True), "armeb" : (40, 0, 0, False, True), }, diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index b4987608ed..c5192d59d4 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -78,6 +78,10 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" UBOOT_ENTRYPOINT ?= "20008000" UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" +# For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE. +# We don't want to override kernel Makefile variables from the environment +EXTRA_OEMAKE = "" + kernel_do_compile() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}" @@ -103,8 +107,15 @@ kernel_do_stage() { cp -fR arch/${ARCH}/include/asm/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/ install -d ${STAGING_KERNEL_DIR}/arch/${ARCH}/include cp -fR arch/${ARCH}/* ${STAGING_KERNEL_DIR}/arch/${ARCH}/ + + # Check for arch/x86 on i386 + elif [ -d arch/x86/include/asm/ ]; then + cp -fR arch/x86/include/asm/* ${STAGING_KERNEL_DIR}/include/asm-x86/ + install -d ${STAGING_KERNEL_DIR}/arch/x86/include + cp -fR arch/x86/* ${STAGING_KERNEL_DIR}/arch/x86/ fi - rm -f $ASMDIR ${STAGING_KERNEL_DIR}/include/asm + + rm -f ${STAGING_KERNEL_DIR}/include/asm ln -sf $ASMDIR ${STAGING_KERNEL_DIR}/include/asm mkdir -p ${STAGING_KERNEL_DIR}/include/asm-generic @@ -175,6 +186,7 @@ kernel_do_install() { install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION} + [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION} install -d ${D}/etc/modutils if [ "${KERNEL_MAJOR_VERSION}" = "2.6" ]; then install -d ${D}/etc/modprobe.d @@ -225,7 +237,7 @@ EXPORT_FUNCTIONS do_compile do_install do_stage do_configure PACKAGES = "kernel kernel-base kernel-image kernel-dev kernel-vmlinux" FILES = "" FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" -FILES_kernel-dev = "/boot/System.map* /boot/config*" +FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config*" FILES_kernel-vmlinux = "/boot/vmlinux*" RDEPENDS_kernel = "kernel-base" RRECOMMENDS_kernel-module-hostap-cs += '${@base_version_less_or_equal("KERNEL_VERSION", "2.6.17", "", "apm-wifi-suspendfix", d)}' @@ -510,6 +522,7 @@ addtask uboot_mkimage before do_install after do_compile KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}" KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}" +MODULES_IMAGE_BASE_NAME ?= modules-${PV}-${PR}-${MACHINE} do_deploy() { install -d ${DEPLOY_DIR_IMAGE} @@ -517,7 +530,7 @@ do_deploy() { package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin if [ -d "${D}/lib" ]; then - tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${PV}-${PR}-${MACHINE}.tgz -C ${D} lib + tar -cvzf ${DEPLOY_DIR_IMAGE}/${MODULES_IMAGE_BASE_NAME}.tgz -C ${D} lib fi cd ${DEPLOY_DIR_IMAGE} diff --git a/classes/package.bbclass b/classes/package.bbclass index f6bd7c5b4a..5a9fa503ae 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -202,6 +202,51 @@ def runstrip(file, d): return 1 +def write_package_md5sums (root, outfile, ignorepaths): + # For each regular file under root, writes an md5sum to outfile. + # With thanks to patch.bbclass. + import bb, os + + try: + # Python 2.5+ + import hashlib + ctor = hashlib.md5 + except ImportError: + import md5 + ctor = md5.new + + outf = file(outfile, 'w') + + # Each output line looks like: "<hex...> <filename without leading slash>" + striplen = len(root) + if not root.endswith('/'): + striplen += 1 + + for walkroot, dirs, files in os.walk(root): + # Skip e.g. the DEBIAN directory + if walkroot[striplen:] in ignorepaths: + dirs[:] = [] + continue + + for name in files: + fullpath = os.path.join(walkroot, name) + if os.path.islink(fullpath) or (not os.path.isfile(fullpath)): + continue + + m = ctor() + f = file(fullpath, 'rb') + while True: + d = f.read(8192) + if not d: + break + m.update(d) + f.close() + + print >> outf, "%s %s" % (m.hexdigest(), fullpath[striplen:]) + + outf.close() + + # # Package data handling routines # diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass index e5339a9064..4a17010538 100644 --- a/classes/package_deb.bbclass +++ b/classes/package_deb.bbclass @@ -243,6 +243,13 @@ python do_package_deb () { conffiles.write('%s\n' % f) conffiles.close() + try: + write_package_md5sums(root, os.path.join(controldir, 'md5sums'), + ['DEBIAN']) + except: + bb.utils.unlockfile(lf) + raise + os.chdir(basedir) ret = os.system("PATH=\"%s\" fakeroot dpkg-deb -b %s %s" % (bb.data.getVar("PATH", localdata, 1), root, pkgoutdir)) if ret != 0: diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass index e3a7522619..e5561082fd 100644 --- a/classes/package_ipk.bbclass +++ b/classes/package_ipk.bbclass @@ -266,10 +266,9 @@ python do_package_ipk () { ctrlfile.write("Replaces: %s\n" % ", ".join(rreplaces)) if rconflicts: ctrlfile.write("Conflicts: %s\n" % ", ".join(rconflicts)) - src_uri = bb.data.getVar("SRC_URI", localdata, 1) - if src_uri: - src_uri = re.sub("\s+", " ", src_uri) - ctrlfile.write("Source: %s\n" % " ".join(src_uri.split())) + src_uri = bb.data.getVar("SRC_URI", localdata, 1) or d.getVar("FILE", True) + src_uri = re.sub("\s+", " ", src_uri) + ctrlfile.write("Source: %s\n" % " ".join(src_uri.split())) ctrlfile.close() for script in ["preinst", "postinst", "prerm", "postrm"]: diff --git a/classes/package_rpm.bbclass b/classes/package_rpm.bbclass index 9755bf1d2d..13cb8773af 100644 --- a/classes/package_rpm.bbclass +++ b/classes/package_rpm.bbclass @@ -210,7 +210,9 @@ python do_package_rpm () { python () { import bb - if bb.data.getVar('PACKAGES', d, True) != '': + if bb.data.getVar('PACKAGES', d, True) != '' and \ + not bb.data.inherits_class('native', d) and \ + not bb.data.inherits_class('cross', d): deps = (bb.data.getVarFlag('do_package_write_rpm', 'depends', d) or "").split() deps.append('rpm-native:do_populate_staging') deps.append('fakeroot-native:do_populate_staging') diff --git a/classes/package_tar.bbclass b/classes/package_tar.bbclass index cb70a5fae8..a0eacf27f5 100644 --- a/classes/package_tar.bbclass +++ b/classes/package_tar.bbclass @@ -1,7 +1,5 @@ inherit package -IMAGE_PKGTYPE ?= "tar" - python package_tar_fn () { import os from bb import data diff --git a/classes/patch.bbclass b/classes/patch.bbclass index 2f99e4cf30..dfb8ec960f 100644 --- a/classes/patch.bbclass +++ b/classes/patch.bbclass @@ -189,6 +189,24 @@ def patch_init(d): def Clean(self): """""" + class GitApplyTree(PatchTree): + def __init__(self, dir, d): + PatchTree.__init__(self, dir, d) + + def _applypatch(self, patch, force = False, reverse = False, run = True): + shellcmd = ["git", "--git-dir=.", "apply", "-p%s" % patch['strippath']] + + if reverse: + shellcmd.append('-R') + + shellcmd.append(patch['file']) + + if not run: + return "sh" + "-c" + " ".join(shellcmd) + + return runcmd(["sh", "-c", " ".join(shellcmd)], self.dir) + + class QuiltTree(PatchSet): def _runcmd(self, args, run = True): quiltrc = bb.data.getVar('QUILTRCFILE', self.d, 1) @@ -424,6 +442,7 @@ def patch_init(d): g["PatchSet"] = PatchSet g["PatchTree"] = PatchTree g["QuiltTree"] = QuiltTree + g["GitApplyTree"] = GitApplyTree g["Resolver"] = Resolver g["UserResolver"] = UserResolver g["NOOPResolver"] = NOOPResolver @@ -449,6 +468,7 @@ python patch_do_patch() { patchsetmap = { "patch": PatchTree, "quilt": QuiltTree, + "git": GitApplyTree, } cls = patchsetmap[bb.data.getVar('PATCHTOOL', d, 1) or 'quilt'] diff --git a/classes/qmake_base.bbclass b/classes/qmake_base.bbclass index 5eccfa47e4..50d8bb53da 100644 --- a/classes/qmake_base.bbclass +++ b/classes/qmake_base.bbclass @@ -33,7 +33,7 @@ oe_qmake_mkspecs () { qmake_base_do_configure() { case ${QMAKESPEC} in - *linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++|*linux-uclibcgnueabi-oe-g++) + *linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++|*linux-uclibceabi-oe-g++) ;; *-oe-g++) die Unsupported target ${TARGET_OS} for oe-g++ qmake spec diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index 29624c3f78..83c03299bf 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -185,7 +185,7 @@ def check_sanity(e): archs = data.getVar('PACKAGE_ARCHS', e.data, True).split() for arch in archs: if archs.count(arch) != 1: - messages = messages + "Error, Your PACKAGE_ARCHS field contains duplicates. Perhaps you set EXTRA_PACKAGE_ARCHS twice accidently through some tune file?\n" + messages = messages + "Error, Your PACKAGE_ARCHS field contains duplicates. Perhaps you set PACKAGE_EXTRA_ARCHS twice accidently through some tune file?\n" break if messages != "": diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass index e51d7ab8a6..2bacd69488 100644 --- a/classes/siteinfo.bbclass +++ b/classes/siteinfo.bbclass @@ -22,21 +22,27 @@ def get_siteinfo_list(d): targetinfo = {\ "armeb-linux": "endian-big bit-32 common-linux common-glibc arm-common",\ + "armeb-linux-gnu": "endian-big bit-32 common-linux common-glibc arm-common",\ "armeb-linux-gnueabi": "endian-big bit-32 common-linux common-glibc arm-common armeb-linux",\ "armeb-linux-uclibc": "endian-big bit-32 common-linux common-uclibc arm-common",\ - "armeb-linux-uclibcgnueabi": "endian-big bit-32 common-linux common-uclibc arm-common armeb-linux-uclibc",\ + "armeb-linux-uclibceabi": "endian-big bit-32 common-linux common-uclibc arm-common armeb-linux-uclibc",\ "arm-darwin": "endian-little bit-32 common-darwin",\ "arm-darwin9": "endian-little bit-32 common-darwin",\ "arm-linux": "endian-little bit-32 common-linux common-glibc arm-common",\ + "arm-linux-gnu": "endian-little bit-32 common-linux common-glibc arm-common",\ "arm-linux-gnueabi": "endian-little bit-32 common-linux common-glibc arm-common arm-linux",\ "arm-linux-uclibc": "endian-little bit-32 common-linux common-uclibc arm-common",\ - "arm-linux-uclibcgnueabi": "endian-little bit-32 common-linux common-uclibc arm-common arm-linux-uclibc",\ + "arm-linux-uclibceabi": "endian-little bit-32 common-linux common-uclibc arm-common arm-linux-uclibc",\ "avr32-linux-uclibc": "endian-big bit-32 common-linux common-uclibc avr32-common",\ "bfin-uclinux-uclibc": "endian-little bit-32 common-uclibc bfin-common",\ "i386-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "i386-linux-gnu": "endian-little bit-32 common-linux common-glibc ix86-common",\ "i486-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "i486-linux-gnu": "endian-little bit-32 common-linux common-glibc ix86-common",\ "i586-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "i586-linux-gnu": "endian-little bit-32 common-linux common-glibc ix86-common",\ "i686-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "i686-linux-gnu": "endian-little bit-32 common-linux common-glibc ix86-common",\ "i386-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ "i486-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ "i586-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ @@ -50,22 +56,34 @@ def get_siteinfo_list(d): "i586-mingw32": "endian-little bit-32 common-mingw ix86-common",\ "i686-mingw32": "endian-little bit-32 common-mingw ix86-common",\ "ia64-linux": "endian-little bit-64 common-linux common-glibc",\ + "ia64-linux-gnu": "endian-little bit-64 common-linux common-glibc",\ "mipsel-linux": "endian-little bit-32 common-linux common-glibc",\ + "mipsel-linux-gnu": "endian-little bit-32 common-linux common-glibc",\ "mipsel-linux-uclibc": "endian-little bit-32 common-linux common-uclibc",\ "mips-linux": "endian-big bit-32 common-linux common-glibc",\ + "mips-linux-gnu": "endian-big bit-32 common-linux common-glibc",\ "mips-linux-uclibc": "endian-big bit-32 common-linux common-uclibc",\ "powerpc-darwin": "endian-big bit-32 common-darwin",\ "ppc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common",\ + "ppc-linux-gnu": "endian-big bit-32 common-linux common-glibc powerpc-common",\ "ppc64-linux": "endian-big bit-64 common-linux common-glibc powerpc-common",\ + "ppc64-linux-gnu": "endian-big bit-64 common-linux common-glibc powerpc-common",\ "powerpc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common",\ + "powerpc-linux-gnu": "endian-big bit-32 common-linux common-glibc powerpc-common",\ "powerpc-linux-gnuspe": "endian-big bit-32 common-linux common-glibc powerpc-common",\ "powerpc-linux-uclibc": "endian-big bit-32 common-linux common-uclibc powerpc-common",\ + "powerpc-linux-uclibcspe": "endian-big bit-32 common-linux common-uclibc powerpc-common",\ "sh3-linux": "endian-little bit-32 common-linux common-glibc sh-common",\ + "sh3-linux-gnu": "endian-little bit-32 common-linux common-glibc sh-common",\ "sh4-linux": "endian-little bit-32 common-linux common-glibc sh-common",\ + "sh4-linux-gnu": "endian-little bit-32 common-linux common-glibc sh-common",\ "sh4-linux-uclibc": "endian-little bit-32 common-linux common-uclibc sh-common",\ "sparc-linux": "endian-big bit-32 common-linux common-glibc",\ + "sparc-linux-gnu": "endian-big bit-32 common-linux common-glibc",\ "viac3-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "viac3-linux-gnu": "endian-little bit-32 common-linux common-glibc ix86-common",\ "x86_64-linux": "endian-little bit-64 common-linux common-glibc",\ + "x86_64-linux-gnu": "endian-little bit-64 common-linux common-glibc",\ "x86_64-linux-uclibc": "endian-little bit-64 common-linux common-uclibc"} if target in targetinfo: info = targetinfo[target].split() diff --git a/classes/src_distribute.bbclass b/classes/src_distribute.bbclass index 30b2670011..7d75c9e16f 100644 --- a/classes/src_distribute.bbclass +++ b/classes/src_distribute.bbclass @@ -1,29 +1,46 @@ +SRC_DISTRIBUTE_DLONLY ?= "0" SRC_DISTRIBUTECOMMAND[func] = "1" + +addtask distribute_sources before do_build after do_fetch python do_distribute_sources () { + import os, re, bb + + bb.build.exec_func("do_fetch", d) + l = bb.data.createCopy(d) bb.data.update_data(l) - licenses = (bb.data.getVar('LICENSE', d, 1) or "unknown").split() - sources_dir = bb.data.getVar('SRC_DISTRIBUTEDIR', d, 1) - import re + licenses = (bb.data.getVar('LICENSE', d, 1) or "unknown").split() for license in licenses: for entry in license.split("|"): for url in ((bb.data.getVar('SRC_URI', d, 1) or '').split()): bb.fetch.init([url], d) s = bb.fetch.localpath(url, d) s = re.sub(';.*$', '', s) + + try: + dlonly = int(d.getVar("SRC_DISTRIBUTE_DLONLY", 1)) + except ValueError: + raise bb.build.FuncFailed("Invalid value for SRC_DISTRIBUTE_DLONLY: expected integer.") + if dlonly: + dldir = os.path.realpath(d.getVar("DL_DIR", 1) or "") + if dldir and not \ + os.path.realpath(s).startswith(dldir + os.path.sep): + continue + cmd = bb.data.getVar('SRC_DISTRIBUTECOMMAND', d, 1) if not cmd: - raise bb.build.FuncFailed("Unable to distribute sources, SRC_DISTRIBUTECOMMAND not defined") - bb.data.setVar('SRC', s, d) - bb.data.setVar('SRC_DISTRIBUTEDIR', "%s/%s" % (sources_dir, entry), d) - bb.build.exec_func('SRC_DISTRIBUTECOMMAND', d) + raise bb.build.FuncFailed("Unable to distribute sources, SRC_DISTRIBUTECOMMAND not set") + bb.debug(2, "srcdist: running %s" % cmd) + bb.data.setVar('SRC', os.path.normpath(s), l) + bb.data.setVar('LIC', entry, l) + bb.build.exec_func('SRC_DISTRIBUTECOMMAND', l) } -addtask distribute_sources before do_build after do_fetch +addtask distribute_sources_all after do_distribute_sources +do_distribute_sources_all[recrdeptask] = "do_distribute_sources" +do_distribute_sources_all[nostamp] = "1" -addtask distsrcall after do_distribute_sources -do_distsrcall[recrdeptask] = "do_distribute_sources" -base_do_distsrcall() { - : -} +# compatability wrapper +addtask distsrcall after do_distribute_sources_all +do_distsrcall[nostamp] = "1" diff --git a/classes/src_distribute_local.bbclass b/classes/src_distribute_local.bbclass index 5f0cef5bec..5cec2880aa 100644 --- a/classes/src_distribute_local.bbclass +++ b/classes/src_distribute_local.bbclass @@ -1,31 +1,37 @@ inherit src_distribute -# SRC_DIST_LOCAL possible values: -# copy copies the files from ${A} to the distributedir -# symlink symlinks the files from ${A} to the distributedir -# move+symlink moves the files into distributedir, and symlinks them back SRC_DIST_LOCAL ?= "move+symlink" SRC_DISTRIBUTEDIR ?= "${DEPLOY_DIR}/sources" -SRC_DISTRIBUTECOMMAND () { - s="${SRC}" - if [ ! -L "$s" ] && (echo "$s"|grep "^${DL_DIR}"); then - : |
