diff options
author | Chris Larson <clarson@kergoth.com> | 2004-12-09 01:08:40 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2004-12-09 01:08:40 +0000 |
commit | 00f6a165aeeab027ba0361f2d9601cb359d73726 (patch) | |
tree | f6b2d21b56d7c3edcd5d0c79f2a5b5f4f1fb0137 /classes | |
parent | d5e1c8f0a7f8dead22fa2cde9ff86a96a59346c3 (diff) |
More rename updates.
BKrev: 41b7a598bGnuzf3sKWuCwtAE9oItIw
Diffstat (limited to 'classes')
-rw-r--r-- | classes/base.bbclass | 5 | ||||
-rw-r--r-- | classes/image_ipk.bbclass | 72 |
2 files changed, 75 insertions, 2 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 09710b0a8b..9ab1fdc7b0 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -465,13 +465,14 @@ python base_eventhandler() { addtask configure after do_unpack do_patch do_configure[dirs] = "${S} ${B}" - +do_configure[bbdepcmd] = "do_populate_staging" base_do_configure() { : } addtask compile after do_configure do_compile[dirs] = "${S} ${B}" +do_compile[bbdepcmd] = "do_populate_staging" base_do_compile() { if [ -e Makefile -o -e makefile ]; then oe_runmake || die "make failed" @@ -682,7 +683,7 @@ addtask emit_manifest python do_emit_manifest () { # FIXME: emit a manifest here # 1) adjust PATH to hit the wrapper scripts - wrappers = bb.which(bb.data.getVar("OEPATH", d, 1), 'build/install', 0) + wrappers = bb.which(bb.data.getVar("BBPATH", d, 1), 'build/install', 0) path = (bb.data.getVar('PATH', d, 1) or '').split(':') path.insert(0, os.path.dirname(wrappers)) bb.data.setVar('PATH', ':'.join(path), d) diff --git a/classes/image_ipk.bbclass b/classes/image_ipk.bbclass index e69de29bb2..0778114b4f 100644 --- a/classes/image_ipk.bbclass +++ b/classes/image_ipk.bbclass @@ -0,0 +1,72 @@ +inherit rootfs_ipk + +# Images are generally built explicitly, do not need to be part of world. +EXCLUDE_FROM_WORLD = "1" + +USE_DEVFS ?= "0" + +DEPENDS += "makedevs-native" + +def get_image_deps(d): + import bb + str = "" + for type in (bb.data.getVar('IMAGE_FSTYPES', d, 1) or "").split(): + deps = bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or "" + if deps: + str += " %s" % deps + return str + +DEPENDS += "${@get_image_deps(d)}" + +IMAGE_DEVICE_TABLE = "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'files/device_table-minimal.txt')}" +IMAGE_POSTPROCESS_COMMAND ?= "" + +# Must call real_do_rootfs() from inside here, rather than as a separate +# task, so that we have a single fakeroot context for the whole process. +fakeroot do_rootfs () { + set -x + rm -rf ${IMAGE_ROOTFS} + + if [ "${USE_DEVFS}" != "1" ]; then + mkdir -p ${IMAGE_ROOTFS}/dev + makedevs -r ${IMAGE_ROOTFS} -D ${IMAGE_DEVICE_TABLE} + fi + + real_do_rootfs + + insert_feed_uris + + rm ${IMAGE_ROOTFS}/usr/lib/ipkg/lists/oe + + ${IMAGE_PREPROCESS_COMMAND} + + export TOPDIR=${TOPDIR} + + for type in ${IMAGE_FSTYPES}; do + if test -z "$FAKEROOTKEY"; then + fakeroot -i ${TMPDIR}/fakedb.image oeimage -t $type -e ${FILE} + else + oeimage -n "${IMAGE_NAME}" -t "$type" -e "${FILE}" + fi + done + + ${IMAGE_POSTPROCESS_COMMAND} +} + +insert_feed_uris () { + + echo "Building feeds for [${DISTRO}].." + + for line in ${FEED_URIS} + do + # strip leading and trailing spaces/tabs, then split into name and uri + line_clean="`echo "$line"|sed 's/^[ \t]*//;s/[ \t]*$//'`" + feed_name="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\1/p'`" + feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`" + + echo "Added $feed_name feed with URL $feed_uri" + + # insert new feed-sources + echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/ipkg/${feed_name}-feed.conf + done +} |