diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/base.bbclass | 45 | ||||
-rw-r--r-- | classes/gnome.bbclass | 3 | ||||
-rw-r--r-- | classes/insane.bbclass | 14 | ||||
-rw-r--r-- | classes/kernel.bbclass | 2 | ||||
-rw-r--r-- | classes/nas100d-image.bbclass | 5 | ||||
-rw-r--r-- | classes/nylon-image.bbclass | 3 | ||||
-rw-r--r-- | classes/nylon-mirrors.bbclass | 8 | ||||
-rw-r--r-- | classes/oestats-client.bbclass | 20 | ||||
-rw-r--r-- | classes/package.bbclass | 4 | ||||
-rw-r--r-- | classes/package_rpm.bbclass | 2 | ||||
-rw-r--r-- | classes/packaged-staging.bbclass | 8 | ||||
-rw-r--r-- | classes/patch.bbclass | 14 | ||||
-rw-r--r-- | classes/rootfs_deb.bbclass | 10 | ||||
-rw-r--r-- | classes/siteinfo.bbclass | 1 | ||||
-rw-r--r-- | classes/xfce.bbclass | 2 |
15 files changed, 83 insertions, 58 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index e5fd814b25..e622aeec51 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -39,6 +39,14 @@ def base_path_relative(src, dest): return sep.join(relpath) +def base_path_out(path, d): + """ Prepare a path for display to the user. """ + rel = base_path_relative(d.getVar("TOPDIR", 1), path) + if len(rel) > len(path): + return path + else: + return rel + # for MD5/SHA handling def base_chk_load_parser(config_paths): import ConfigParser, os, bb @@ -69,6 +77,7 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, data): # md5 and sha256 should be valid now if not os.path.exists(localpath): + localpath = base_path_out(localpath, data) bb.note("The localpath does not exist '%s'" % localpath) raise Exception("The path does not exist '%s'" % localpath) @@ -125,9 +134,11 @@ def base_dep_prepend(d): # the case where host == build == target, for now we don't work in # that case though. # - deps = "shasum-native " - if bb.data.getVar('PN', d, True) == "shasum-native": + deps = "shasum-native coreutils-native" + if bb.data.getVar('PN', d, True) == "shasum-native" or bb.data.getVar('PN', d, True) == "stagemanager-native": deps = "" + if bb.data.getVar('PN', d, True) == "coreutils-native": + deps = "shasum-native" # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not # we need that built is the responsibility of the patch function / class, not @@ -495,11 +506,11 @@ python base_do_clean() { """clear the build and temp directories""" dir = bb.data.expand("${WORKDIR}", d) if dir == '//': raise bb.build.FuncFailed("wrong DATADIR") - bb.note("removing " + dir) + bb.note("removing " + base_path_out(dir, d)) os.system('rm -rf ' + dir) dir = "%s.*" % bb.data.expand(bb.data.getVar('STAMP', d), d) - bb.note("removing " + dir) + bb.note("removing " + base_path_out(dir, d)) os.system('rm -f '+ dir) } @@ -554,7 +565,7 @@ python base_do_distclean() { except bb.MalformedUrl, e: bb.debug(1, 'Unable to generate local path for malformed uri: %s' % e) else: - bb.note("removing %s" % local) + bb.note("removing %s" % base_path_out(local, d)) try: if os.path.exists(local + ".md5"): os.remove(local + ".md5") @@ -775,7 +786,7 @@ def oe_unpack_file(file, data, url = None): os.chdir(newdir) cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', data, 1), cmd) - bb.note("Unpacking %s to %s/" % (file, os.getcwd())) + bb.note("Unpacking %s to %s/" % (base_path_out(file, data), base_path_out(os.getcwd(), data))) ret = os.system(cmd) os.chdir(save_cwd) @@ -894,22 +905,11 @@ python base_eventhandler() { from bb.event import Handled, NotHandled, getName import os - messages = {} - messages["Completed"] = "completed" - messages["Succeeded"] = "completed" - messages["Started"] = "started" - messages["Failed"] = "failed" - name = getName(e) - msg = "" - if name.startswith("Task"): - msg += "package %s: task %s: " % (data.getVar("PF", e.data, 1), e.task) - msg += messages.get(name[4:]) or name[4:] - elif name.startswith("Build"): - msg += "build %s: " % e.name - msg += messages.get(name[5:]) or name[5:] + if name == "TaskCompleted": + msg = "package %s: task %s is complete." % (data.getVar("PF", e.data, 1), e.task) elif name == "UnsatisfiedDep": - msg += "package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower()) + msg = "package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower()) else: return NotHandled @@ -1234,8 +1234,11 @@ def check_app_exists(app, d): return len(which(path, app)) != 0 def check_gcc3(data): + # Primarly used by qemu to make sure we have a workable gcc-3.4.x. + # Start by checking for the program name as we build it, was not + # all host-provided gcc-3.4's will work. - gcc3_versions = 'gcc-3.4 gcc34 gcc-3.4.4 gcc-3.4.6 gcc-3.4.7 gcc-3.3 gcc33 gcc-3.3.6 gcc-3.2 gcc32' + gcc3_versions = 'gcc-3.4.6 gcc-3.4.4 gcc34 gcc-3.4 gcc-3.4.7 gcc-3.3 gcc33 gcc-3.3.6 gcc-3.2 gcc32' for gcc3 in gcc3_versions.split(): if check_app_exists(gcc3, data): diff --git a/classes/gnome.bbclass b/classes/gnome.bbclass index 89fb3a19f8..d2ca739e40 100644 --- a/classes/gnome.bbclass +++ b/classes/gnome.bbclass @@ -17,6 +17,9 @@ inherit autotools gtk-icon-cache pkgconfig gconf mime AUTOTOOLS_STAGE_PKGCONFIG = "1" +PACKAGES =+ "${PN}-scrollkeeper-leftovers" +FILES_${PN}-scrollkeeper-leftovers = "${localstatedir}/lib/scrollkeeper" + gnome_stage_includes() { autotools_stage_includes } diff --git a/classes/insane.bbclass b/classes/insane.bbclass index cc881dc0d8..606270d62c 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -219,7 +219,7 @@ def package_qa_write_error(error_class, name, path, d): def package_qa_handle_error(error_class, error_msg, name, path, d): import bb - bb.error("QA Issue: %s" % error_msg) + bb.error("QA Issue with %s: %s" % (name, error_msg)) package_qa_write_error(error_class, name, path, d) return not package_qa_make_fatal_error(error_class, name, path, d) @@ -499,7 +499,7 @@ def package_qa_check_rdepends(pkg, workdir, d): # The PACKAGE FUNC to scan each package python do_package_qa () { import bb - bb.note("DO PACKAGE QA") + bb.debug(2, "DO PACKAGE QA") workdir = bb.data.getVar('WORKDIR', d, True) packages = bb.data.getVar('PACKAGES',d, True) @@ -515,10 +515,10 @@ python do_package_qa () { rdepends_sane = True for package in packages.split(): if bb.data.getVar('INSANE_SKIP_' + package, d, True): - bb.note("Package: %s (skipped)" % package) + bb.note("package %s skipped" % package) continue - bb.note("Checking Package: %s" % package) + bb.debug(1, "Checking Package: %s" % package) path = "%s/install/%s" % (workdir, package) if not package_qa_walk(path, checks, package, d): walk_sane = False @@ -527,14 +527,14 @@ python do_package_qa () { if not walk_sane or not rdepends_sane: bb.fatal("QA run found fatal errors. Please consider fixing them.") - bb.note("DONE with PACKAGE QA") + bb.debug(2, "DONE with PACKAGE QA") } # The Staging Func, to check all staging addtask qa_staging after do_populate_staging before do_build python do_qa_staging() { - bb.note("QA checking staging") + bb.debug(2, "QA checking staging") if not package_qa_check_staged(bb.data.getVar('STAGING_LIBDIR',d,True), d): bb.fatal("QA staging was broken by the package built above") @@ -543,7 +543,7 @@ python do_qa_staging() { # Check broken config.log files addtask qa_configure after do_configure before do_compile python do_qa_configure() { - bb.note("Checking sanity of the config.log file") + bb.debug(1, "Checking sanity of the config.log file") import os for root, dirs, files in os.walk(bb.data.getVar('WORKDIR', d, True)): statement = "grep 'CROSS COMPILE Badness:' %s > /dev/null" % \ diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 954c407d51..1323228a74 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -118,7 +118,7 @@ kernel_do_stage() { mkdir -p ${STAGING_KERNEL_DIR}/include/pcmcia cp -fR include/pcmcia/* ${STAGING_KERNEL_DIR}/include/pcmcia/ - for entry in drivers/crypto drivers/media include/media include/acpi include/sound include/video include/scsi; do + for entry in drivers/crypto drivers/media include/media include/acpi include/sound include/video include/scsi include/trace; do if [ -d $entry ]; then mkdir -p ${STAGING_KERNEL_DIR}/$entry cp -fR $entry/* ${STAGING_KERNEL_DIR}/$entry/ diff --git a/classes/nas100d-image.bbclass b/classes/nas100d-image.bbclass index 1150116bdb..0877b4f84d 100644 --- a/classes/nas100d-image.bbclass +++ b/classes/nas100d-image.bbclass @@ -1,6 +1,6 @@ nas100d_pack_image () { install -d ${DEPLOY_DIR_IMAGE}/firmupgrade - install -m 0755 ${DEPLOY_DIR_IMAGE}/zImage-nas100d${SITEINFO_ENDIANESS} \ + install -m 0755 ${DEPLOY_DIR_IMAGE}/zImage-nslu2${SITEINFO_ENDIANESS}.bin \ ${DEPLOY_DIR_IMAGE}/firmupgrade/ip-ramdisk install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \ ${DEPLOY_DIR_IMAGE}/firmupgrade/rootfs.gz @@ -16,5 +16,4 @@ nas100d_pack_image () { rm -rf ${DEPLOY_DIR_IMAGE}/firmupgrade } -# nas100d is not a separate machine - use the nslu2 machine override. -IMAGE_POSTPROCESS_COMMAND_nslu2 += "nas100d_pack_image; " +IMAGE_POSTPROCESS_COMMAND += "nas100d_pack_image; " diff --git a/classes/nylon-image.bbclass b/classes/nylon-image.bbclass index 6d867eab48..e973bf7cf5 100644 --- a/classes/nylon-image.bbclass +++ b/classes/nylon-image.bbclass @@ -9,11 +9,10 @@ nylon_create_imgz() { # 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} + cp ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${DEPLOY_DIR_IMAGE}/tmp/rootfs.jffs2 # make an imgz out of tmp ( cd ${DEPLOY_DIR_IMAGE}/tmp; tar cvzf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.imgz * ) diff --git a/classes/nylon-mirrors.bbclass b/classes/nylon-mirrors.bbclass index 02fddc01ba..11cc45ca0c 100644 --- a/classes/nylon-mirrors.bbclass +++ b/classes/nylon-mirrors.bbclass @@ -1,6 +1,6 @@ MIRRORS_append () { -ftp://.*/.* http://meshcube.org/nylon/stable/sources/ -https?://.*/.* http://meshcube.org/nylon/stable/sources/ -ftp://.*/.* http://meshcube.org/nylon/unstable/sources/ -https?://.*/.* http://meshcube.org/nylon/unstable/sources/ +ftp://.*/.*/ http://download.berlin.freifunk.net/meshcube.org/nylon/stable/sources/ +http://.*/.*/ http://download.berlin.freifunk.net/meshcube.org/nylon/stable/sources/ +ftp://.*/.*/ http://download.berlin.freifunk.net/meshcube.org/nylon/unstable/sources/ +http://.*/.*/ http://download.berlin.freifunk.net/meshcube.org/nylon/unstable/sources/ }
\ No newline at end of file diff --git a/classes/oestats-client.bbclass b/classes/oestats-client.bbclass index 6d348d3ded..8922496242 100644 --- a/classes/oestats-client.bbclass +++ b/classes/oestats-client.bbclass @@ -18,8 +18,9 @@ def oestats_getid(d): f = file(bb.data.getVar('TMPDIR', d, True) + '/oestats.id', 'r') return f.read() -def oestats_send(server, action, vars = {}, files = {}): +def oestats_send(d, server, action, vars = {}, files = {}): import httplib + import bb # build body output = [] @@ -49,7 +50,16 @@ def oestats_send(server, action, vars = {}, files = {}): "Content-length": str(len(body))} # send request - conn = httplib.HTTPConnection(server) + proxy = bb.data.getVar('HTTP_PROXY', d, True ) + if (proxy): + if (proxy.endswith('/')): + proxy = proxy[:-1] + if (proxy.startswith('http://')): + proxy = proxy[7:] + conn = httplib.HTTPConnection(proxy) + action = "http://%s%s" %(server, action) + else: + conn = httplib.HTTPConnection(server) conn.request("POST", action, body, headers) response = conn.getresponse() data = response.read() @@ -64,7 +74,7 @@ def oestats_start(server, builder, d): # send report id = "" try: - data = oestats_send(server, "/builds/", { + data = oestats_send(d, server, "/builds/", { 'builder': builder, 'build_arch': bb.data.getVar('BUILD_ARCH', d, True), 'metadata_branch': bb.data.getVar('METADATA_BRANCH', d, True), @@ -97,7 +107,7 @@ def oestats_stop(server, d, failures): status = "Succeeded" try: - response = oestats_send(server, "/builds/%s/" % id, { + response = oestats_send(d, server, "/builds/%s/" % id, { 'status': status, }) if status == 'Failed': @@ -157,7 +167,7 @@ def oestats_task(server, d, task, status): # send report try: - response = oestats_send(server, "/tasks/", vars, files) + response = oestats_send(d, server, "/tasks/", vars, files) if status == 'Failed': bb.note("oestats: task failed, see http://%s%s" % (server, response)) except: diff --git a/classes/package.bbclass b/classes/package.bbclass index 8a77369682..3360dcb2de 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -166,7 +166,7 @@ def runstrip(file, d): # If the file is in a .debug directory it was already stripped, # don't do it again... if os.path.dirname(file).endswith(".debug"): - bb.note("Already ran strip") + bb.debug(2, "Already ran strip on %s" % file) return 0 strip = bb.data.getVar("STRIP", d, 1) @@ -564,7 +564,7 @@ python package_do_shlibs() { exclude_shlibs = bb.data.getVar('EXCLUDE_FROM_SHLIBS', d, 0) if exclude_shlibs: - bb.note("not generating shlibs") + bb.debug(1, "not generating shlibs") return lib_re = re.compile("^lib.*\.so") diff --git a/classes/package_rpm.bbclass b/classes/package_rpm.bbclass index 71fa76010f..0cebdea244 100644 --- a/classes/package_rpm.bbclass +++ b/classes/package_rpm.bbclass @@ -136,7 +136,7 @@ python write_specfile() { bb.build.exec_func('BUILDSPEC', d) # move the rpm into the pkgoutdir - rpm = bb.data.expand('${RPMBUILDPATH}/RPMS/${TARGET_ARCH}/${PKG}-${RPMPV}-${PR}.${TARGET_ARCH}.rpm', d) + rpm = bb.data.expand('${RPMBUILDPATH}/RPMS/${TARGET_ARCH}/${PKG}-${RPMPV}-${PR}${DISTRO_PR}.${TARGET_ARCH}.rpm', d) outrpm = bb.data.expand('${DEPLOY_DIR_RPM}/${PACKAGE_ARCH}/${PKG}-${RPMPV}-${PR}.${TARGET_ARCH}.rpm', d) bb.movefile(rpm, outrpm) } diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass index 849f60c500..bd7b9ea398 100644 --- a/classes/packaged-staging.bbclass +++ b/classes/packaged-staging.bbclass @@ -109,17 +109,17 @@ def pstage_cleanpackage(pkgname, d): pstage_set_pkgmanager(d) list_cmd = bb.data.getVar("PSTAGE_LIST_CMD", d, True) - bb.note("Checking if staging package installed") + bb.debug(2, "Checking if staging package installed") lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) ret = os.system("PATH=\"%s\" %s | grep %s" % (path, list_cmd, pkgname)) if ret == 0: - bb.note("Yes. Uninstalling package from staging...") + bb.debug(1, "Uninstalling package from staging...") removecmd = bb.data.getVar("PSTAGE_REMOVE_CMD", d, 1) ret = os.system("PATH=\"%s\" %s %s" % (path, removecmd, pkgname)) if ret != 0: bb.note("Failure removing staging package") else: - bb.note("No. Manually removing any installed files") + bb.debug(1, "Manually removing any installed files from staging...") pstage_manualclean("staging", "STAGING_DIR", d) pstage_manualclean("cross", "CROSS_DIR", d) pstage_manualclean("deploy", "DEPLOY_DIR", d) @@ -135,7 +135,7 @@ do_clean_prepend() { pstage_cleanpackage(removepkg, d) stagepkg = bb.data.expand("${PSTAGE_PKG}", d) - bb.note("Removing staging package %s" % stagepkg) + bb.note("Removing staging package %s" % base_path_out(stagepkg, d)) os.system('rm -rf ' + stagepkg) } diff --git a/classes/patch.bbclass b/classes/patch.bbclass index 075e826523..2f99e4cf30 100644 --- a/classes/patch.bbclass +++ b/classes/patch.bbclass @@ -13,14 +13,22 @@ def patch_init(d): return "Error: %s not found." % self.path def md5sum(fname): - import md5, sys + import sys + + # when we move to Python 2.5 as minimal supported + # we can kill that try/except as hashlib is 2.5+ + try: + import hashlib + m = hashlib.md5() + except ImportError: + import md5 + m = md5.new() try: f = file(fname, 'rb') except IOError: raise NotFoundError(fname) - m = md5.new() while True: d = f.read(8096) if not d: @@ -519,7 +527,7 @@ python patch_do_patch() { bb.note("Patch '%s' applies to earlier revisions" % pname) continue - bb.note("Applying patch '%s' (%s)" % (pname, unpacked)) + bb.note("Applying patch '%s' (%s)" % (pname, base_path_out(unpacked, d))) try: patchset.Import({"file":unpacked, "remote":url, "strippath": pnum}, True) except: diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass index 2768c2afb2..82220661f3 100644 --- a/classes/rootfs_deb.bbclass +++ b/classes/rootfs_deb.bbclass @@ -24,10 +24,12 @@ fakeroot rootfs_deb_do_rootfs () { continue; fi cd ${DEPLOY_DIR_DEB}/$arch - # if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then - rm -f Packages.gz Packages Packages.bz2 - # fi - dpkg-scanpackages . | bzip2 > Packages.bz2 + rm -f Packages.gz Packages Packages.bz2 + + # apt-native ignores Packages.bz2 unless /bin/bzip2 exists + # on the build host, so stick with gzip + dpkg-scanpackages . | gzip > Packages.gz + echo "Label: $arch" > Release echo "deb file:${DEPLOY_DIR_DEB}/$arch/ ./" >> ${STAGING_ETCDIR_NATIVE}/apt/sources.list.rev diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass index 82a1616d05..0221b123f1 100644 --- a/classes/siteinfo.bbclass +++ b/classes/siteinfo.bbclass @@ -49,6 +49,7 @@ def get_siteinfo_list(d): "i486-mingw32": "endian-little bit-32 common-mingw ix86-common",\ "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",\ "mipsel-linux": "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",\ diff --git a/classes/xfce.bbclass b/classes/xfce.bbclass index 48e012e67e..b18313fa2a 100644 --- a/classes/xfce.bbclass +++ b/classes/xfce.bbclass @@ -5,7 +5,7 @@ # Global class to make it easier to maintain XFCE packages HOMEPAGE = "http://www.xfce.org" -LICENSE = "LGPL-2" +LICENSE = "LGPLv2" DEPENDS += "startup-notification" XFCE_VERSION = ${PV} |