Bug 1315 - Kernel not recreated with rootfs when bzImage missing
Summary: Kernel not recreated with rootfs when bzImage missing
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 1.0
Hardware: x86 Multiple
: Medium major
Target Milestone: 1.1
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard: RFC patch posted to OE-core ml (17 Aug)
Depends on:
Blocks: 1346
  Show dependency tree
 
Reported: 2011-08-02 14:31 UTC by Dave Stewart
Modified: 2011-08-25 03:07 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Stewart 2011-08-02 14:31:48 UTC
When I remove all the files from tmp/deploy/images and redo my build using Hob, there is no kernel built. 

Joshua says you can get this with "bitbake -c deploy virtual/kernel -f" but for sure this needs to be fixed.
Comment 1 Joshua Lock - Disabled 2011-08-02 14:49:54 UTC
This will happen regardless of how you initiate a build, not just with hob.
Comment 2 Richard Purdie 2011-08-03 09:23:50 UTC
This is expected behavior. Bitbake will only redeploy something if that thing has changed. You can't randomly delete things and have bitbake figure out what you deleted and what it needs to do to get it back...
Comment 3 Dave Stewart 2011-08-08 13:32:26 UTC
It did change... it was deleted.

It's not unreasonable to expect that a user will delete files in this directory.

In this case, if I want to rebuild the end product of the build, I would expect that I could just delete these end products and expect the build system to regenerate them.  This is how "make" works, for example.

How else would I force the the rootfs and kernel to be remade?
Comment 4 Richard Purdie 2011-08-08 17:06:50 UTC
If you remove random files from your windows system directory do you expect it still to work?

The correct way to tell bitbake to rebuild something is to clean it (e.g. "bitbake virtual/kernel -c clean"). This is the one correct way to rebuild anything.

The problem is we don't track the "output" of each task as whilst make and git can do this for projects of a certain size, we're talking about giagbytes of build data and we simply can't track that number of files and still respond to user requests in a timely fashion (have you seem how long a delete of a build takes? :( ).

We could start special casing tasks but this then teaches the user that deleting files is ok. We'll then get the bug report that file X was changed of deleted and we didn't manage to detect that. I don't want give users the impression this is ok and instead I want to ensure we have consistency in the behavior.
Comment 5 Dave Stewart 2011-08-09 09:59:31 UTC
OK - Richard and I talked - this is definitely an area for potential confusion, but it sounds like it's hard to fix effectively in bitbake.

So we agreed to two actions:

1. Let's put a file in the tmp/deploy/images directory when we create it which is named something like: "README - DO NOT DELETE FILES IN THIS DIRECTORY" and which contains instructions on what to do properly.

2. Add to the Quick Start Guide a warning similar to this when you describe the tmp/deploy/images content.
Comment 6 Richard Purdie 2011-08-10 01:36:55 UTC
Reclassifying this a medium priority and assigning to Paul.
Comment 7 Paul Eggleton 2011-08-25 03:07:14 UTC
Feature has now been added in commit http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=333d571b360e112d7ade0b4ae3bacbda9c8b228d