Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [RFC PATCH 1/2] image.bbclass, kernel.bbclass: create warning file about deleting deploydir files
Date: Wed, 17 Aug 2011 19:37:37 +0100	[thread overview]
Message-ID: <8c4bf939c0906cd744debeb85d5d55de622c184e.1313606178.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1313606178.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1313606178.git.paul.eggleton@linux.intel.com>

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      |    2 ++
 meta/classes/kernel.bbclass     |    2 ++
 meta/files/deploydir_readme.txt |    8 ++++++++
 3 files changed, 12 insertions(+), 0 deletions(-)
 create mode 100644 meta/files/deploydir_readme.txt

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 54eb78b..286ae01 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -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
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 386b05e..a2b10f2 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -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
index 0000000..97ec185
--- /dev/null
+++ b/meta/files/deploydir_readme.txt
@@ -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.
-- 
1.7.4.1




  reply	other threads:[~2011-08-17 18:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-17 18:37 [RFC PATCH 0/2] Couple of fixes to help new users Paul Eggleton
2011-08-17 18:37 ` Paul Eggleton [this message]
2011-08-17 18:41   ` [RFC PATCH 1/2] image.bbclass, kernel.bbclass: create warning file about deleting deploydir files Phil Blundell
2011-08-19 10:27     ` Paul Eggleton
2011-08-23 19:08       ` Darren Hart
2011-08-23 20:07         ` Paul Eggleton
2011-08-23 21:39           ` Koen Kooi
2011-08-23 21:52             ` Paul Eggleton
2011-08-22 21:01   ` Koen Kooi
2011-08-23  6:44     ` Anders Darander
2011-08-23  8:33       ` Koen Kooi
2011-08-23  9:22       ` Phil Blundell
2011-08-23  9:32         ` Paul Eggleton
2011-08-23 10:37           ` Phil Blundell
2011-08-17 18:37 ` [RFC PATCH 2/2] sanity.bbclass: add optional untested host distro warning Paul Eggleton
2011-08-23 15:14 ` [RFC PATCH 0/2] Couple of fixes to help new users Saul Wold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8c4bf939c0906cd744debeb85d5d55de622c184e.1313606178.git.paul.eggleton@linux.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox