Bug 6502 - Image does not get rebuild after changes in image recipe
Summary: Image does not get rebuild after changes in image recipe
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.6.1
Hardware: x86 Multiple
: Medium minor
Target Milestone: 1.7
Assignee: Roxana Ciobanu
QA Contact:
URL:
Whiteboard:
: 7024 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-02 22:53 UTC by Volker
Modified: 2015-01-27 10:48 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker 2014-07-02 22:53:23 UTC
I had the following in my image recipe
----
set_root_pwd() {                                                                
    # we know we have /etc/shadows because we install openssh
    sed -i 's|^root:[^:]*:|root:XXXXXXXX:|' \
        ${IMAGE_ROOTFS}/etc/shadow
}
# execute function on image creation
ROOTFS_POSTPROCESS_COMMAND += "set_root_pwd;
----
then I run bitbake to set the password and it worked. So I have a current image.

Now I disabled the function by commenting out the one line that actually executes it.
---
#ROOTFS_POSTPROCESS_COMMAND += "set_root_pwd;
---

If I try now to build the image again it wont build
---
NOTE: Tasks Summary: Attempted 2655 tasks of which 2655 didn't need to be rerun and all succeeded.
---

I would have assumed that every change would rebuild the changed component. This does not seem to be the case with the image recipe.



Some more details:

Base of my image recipe:
----
IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}"
inherit core-image                                                              
[other options skipped]
----

My distro.conf contains the following line. This is not relevant if you modify the set_root_pwd() to run some other commands. If you don't modify it, you need th ssh-serveropenssh image feature.
---
IMAGE_FEATURES = "read-only-rootfs ssh-serveropenssh package-management"
---
Comment 1 Magnus Olsson 2015-01-27 10:48:51 UTC
*** Bug 7024 has been marked as a duplicate of this bug. ***