]> code.ossystems Code Review - openembedded-core.git/commitdiff
image.bbclass, kernel.bbclass: create warning file about deleting deploydir files
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 16 Aug 2011 17:13:04 +0000 (18:13 +0100)
committerSaul Wold <sgw@linux.intel.com>
Thu, 18 Aug 2011 20:45:43 +0000 (13:45 -0700)
New users sometimes delete files in tmp/deploy/images assuming they will
be re-created just by re-running the build, and then are confused when
this doesn't work. To discourage people from doing this, create a file
called README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt in
tmp/deploy/images containing an explanation of what needs to be done to
re-create files there.

Fixes [YOCTO #1315] and [YOCTO #1346].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
meta/classes/image.bbclass
meta/classes/kernel.bbclass
meta/files/deploydir_readme.txt [new file with mode: 0644]

index 54eb78b7c9f848e08f1879d4c5de63fe47238506..286ae013f9c67ef502c4ac2401371d7ffe3a8f90 100644 (file)
@@ -138,6 +138,8 @@ fakeroot do_rootfs () {
        mkdir -p ${IMAGE_ROOTFS}
        mkdir -p ${DEPLOY_DIR_IMAGE}
 
+       cp -n ${COREBASE}/meta/files/deploydir_readme.txt ${DEPLOY_DIR_IMAGE}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
+
        if [ "${USE_DEVFS}" != "1" ]; then
                for devtable in ${@get_devtable_list(d)}; do
                        makedevs -r ${IMAGE_ROOTFS} -D $devtable
index 386b05e57ad4a23e736b5ffdafba414a21cf0189..a2b10f2c7abae69d24f489f8f5830a4b3ed34a88 100644 (file)
@@ -500,6 +500,8 @@ kernel_do_deploy() {
        cd ${DEPLOYDIR}
        rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
+
+       cp -n ${COREBASE}/meta/files/deploydir_readme.txt ${DEPLOYDIR}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
 }
 do_deploy[dirs] = "${DEPLOYDIR} ${B}"
 
diff --git a/meta/files/deploydir_readme.txt b/meta/files/deploydir_readme.txt
new file mode 100644 (file)
index 0000000..97ec185
--- /dev/null
@@ -0,0 +1,8 @@
+Files in the deploy directory will not be re-created automatically if you
+delete them. If you do delete a file, you will need to run:
+
+  bitbake -c clean TARGET
+  bitbake TARGET
+
+where TARGET is the name of the appropriate package or target e.g.
+"virtual/kernel" for the kernel, an image, etc.