Skip to contentSkip to conversation

rootfs_*.bbclass: exclude BUILDNAME var dependency from do_rootfs

RFC PATCH New Martin Jansa 1 participant 2 messages Sep 28, 2012

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/2 rootfs_*.bbclass: exclude BUILDNAME var dependency from do_rootfs

* I have kernel recipe which depends on other recipe to build tiny initramfs
image, without this change it rebuilds not only that initramfs image
but also whole kernel when DATE or TIME is changed and OEBasicHash enabled
* also resolves ERROR shown when bitbake -S is used for image:
ERROR: Bitbake's cached basehash does not match the one we just generated (/OE/oe-core/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)!
ERROR: The mismatched hashes were 8c35cdf8a5d09c03941f081dd9f6d8dc and b5d6e2e5952770557c48c5779ddb73fc

---
 meta/classes/rootfs_deb.bbclass | 1 +
 meta/classes/rootfs_ipk.bbclass | 1 +
 meta/classes/rootfs_rpm.bbclass | 1 +
 3 files changed, 3 insertions(+)
meta/classes/rootfs_deb.bbclass +1 -0
index 881fdbd..244dc05 100644
@@ -7,6 +7,7 @@ ROOTFS_PKGMANAGE_BOOTSTRAP  = "run-postinsts"
 
 do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot"
 do_rootfs[recrdeptask] += "do_package_write_deb"
+do_rootfs[vardepsexclude] += "BUILDNAME"
 
 do_rootfs[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
 
meta/classes/rootfs_ipk.bbclass +1 -0
index 46e8d60..d3228b9 100644
@@ -11,6 +11,7 @@ ROOTFS_PKGMANAGE_BOOTSTRAP  = "run-postinsts"
 
 do_rootfs[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
 do_rootfs[recrdeptask] += "do_package_write_ipk"
+do_rootfs[vardepsexclude] += "BUILDNAME"
 
 do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
 
meta/classes/rootfs_rpm.bbclass +1 -0
index d95ccfa..c07a948 100644
@@ -20,6 +20,7 @@ do_rootfs[depends] += "opkg-native:do_populate_sysroot"
 do_rootfs[depends] += "createrepo-native:do_populate_sysroot"
 
 do_rootfs[recrdeptask] += "do_package_write_rpm"
+do_rootfs[vardepsexclude] += "BUILDNAME"
 
 RPM_PREPROCESS_COMMANDS = "package_update_index_rpm; package_generate_rpm_conf; "
 RPM_POSTPROCESS_COMMANDS = ""
Signature · 1 line
1.7.12
#1 lore raw

RFC PATCH 2/2 bitbake.conf: exclude DATETIME var dependency from IMAGE_NAME

* resolves ERROR shown when bitbake -S is used for image:
ERROR: Bitbake's cached basehash does not match the one we just generated (/OE/oe-core/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)!
ERROR: The mismatched hashes were 8c35cdf8a5d09c03941f081dd9f6d8dc and b5d6e2e5952770557c48c5779ddb73fc

---
 meta/conf/bitbake.conf | 1 +
 1 file changed, 1 insertion(+)
meta/conf/bitbake.conf +1 -0
index e168ef1..8ac2769 100644
@@ -401,6 +401,7 @@ STAGING_KERNEL_DIR = "${STAGING_DIR_HOST}/usr/src/kernel"
 IMAGE_ROOTFS = "${WORKDIR}/rootfs"
 IMAGE_BASENAME = "${PN}"
 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
+IMAGE_NAME[vardepsexclude] += "DATETIME"
 IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}"
 
 # This option allows for a percentage overage of the actual image size rather than a
Signature · 1 line
1.7.12