diff options
author | Chris Larson <kergoth@openedhand.com> | 2006-09-19 09:04:09 +0000 |
---|---|---|
committer | Chris Larson <kergoth@openedhand.com> | 2006-09-19 09:04:09 +0000 |
commit | 4fa2d11bb1fdb58ff426114169583672fc3d65b8 (patch) | |
tree | 0bd4952bbe057c3dc219be7e371a6a9d496c6535 /meta/classes/image.bbclass | |
parent | 04f695333350e31fa87b7822c17a073af73fcd84 (diff) | |
download | poky-4fa2d11bb1fdb58ff426114169583672fc3d65b8.tar.gz |
Sync up.. all the deb/dpkg changes which I have locally are now in svn.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@728 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r-- | meta/classes/image.bbclass | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass new file mode 100644 index 0000000000..e995265244 --- /dev/null +++ b/meta/classes/image.bbclass | |||
@@ -0,0 +1,58 @@ | |||
1 | inherit rootfs_${IMAGE_PKGTYPE} | ||
2 | |||
3 | # We need to recursively follow RDEPENDS and RRECOMMENDS for images | ||
4 | BUILD_ALL_DEPS = "1" | ||
5 | do_rootfs[recrdeptask] = "do_package" | ||
6 | |||
7 | # Images are generally built explicitly, do not need to be part of world. | ||
8 | EXCLUDE_FROM_WORLD = "1" | ||
9 | |||
10 | USE_DEVFS ?= "0" | ||
11 | |||
12 | DEPENDS += "makedevs-native" | ||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | def get_image_deps(d): | ||
16 | import bb | ||
17 | str = "" | ||
18 | for type in (bb.data.getVar('IMAGE_FSTYPES', d, 1) or "").split(): | ||
19 | deps = bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or "" | ||
20 | if deps: | ||
21 | str += " %s" % deps | ||
22 | return str | ||
23 | |||
24 | DEPENDS += "${@get_image_deps(d)}" | ||
25 | |||
26 | IMAGE_DEVICE_TABLE ?= "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'files/device_table-minimal.txt')}" | ||
27 | IMAGE_POSTPROCESS_COMMAND ?= "" | ||
28 | |||
29 | # Must call real_do_rootfs() from inside here, rather than as a separate | ||
30 | # task, so that we have a single fakeroot context for the whole process. | ||
31 | fakeroot do_rootfs () { | ||
32 | set -x | ||
33 | rm -rf ${IMAGE_ROOTFS} | ||
34 | |||
35 | if [ "${USE_DEVFS}" != "1" ]; then | ||
36 | mkdir -p ${IMAGE_ROOTFS}/dev | ||
37 | makedevs -r ${IMAGE_ROOTFS} -D ${IMAGE_DEVICE_TABLE} | ||
38 | fi | ||
39 | |||
40 | rootfs_${IMAGE_PKGTYPE}_do_rootfs | ||
41 | |||
42 | ${IMAGE_PREPROCESS_COMMAND} | ||
43 | |||
44 | export TOPDIR=${TOPDIR} | ||
45 | |||
46 | for type in ${IMAGE_FSTYPES}; do | ||
47 | if test -z "$FAKEROOTKEY"; then | ||
48 | fakeroot -i ${TMPDIR}/fakedb.image bbimage -t $type -e ${FILE} | ||
49 | else | ||
50 | bbimage -n "${IMAGE_NAME}" -t "$type" -e "${FILE}" | ||
51 | fi | ||
52 | |||
53 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.* | ||
54 | ln -s ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type | ||
55 | done | ||
56 | |||
57 | ${IMAGE_POSTPROCESS_COMMAND} | ||
58 | } | ||