Bug 3299

Summary: bitbake -S doesn't work well
Product: [Build System, Metadata & Runtime] BitBake Reporter: Robert Yang <liezhi.yang>
Component: bitbakeAssignee: Robert Yang <liezhi.yang>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: mark.hatle, Martin.Jansa, poky.bs.watcher, poky.watcher, richard.purdie, sgw, yi.zhao, zhenfeng.zhao
Version: 1.4   
Target Milestone: 1.4 M5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Robert Yang 2012-10-18 08:25:27 UTC
Maybe "bitbake -S" bugs:
   - It seems that the "bitabke -S core-image-sato" has bugs, it would always
     report errors, but doesn't fatal errors

   - "bitbake -S" always generate the nativesdk stamps regardless of what
      we build. (Is this what we expect ?).

   - The gcc-cross' stamps are in tmp/stamps/work-shared, but the
     "bitbake -S" doesn't put the stamps in work-shared.
Comment 1 Martin Jansa 2012-10-23 08:00:20 UTC
See also
http://patchwork.openembedded.org/patch/37453/
http://patchwork.openembedded.org/patch/37455/

I had the same issue, but my motivation was mostly because kernel recipe was being rebuilt every time, because it depended on initramfs creation (do_rootfs) which was changing checksum.
Comment 2 Robert Yang 2012-10-23 08:23:19 UTC
(In reply to comment #1)
> See also
> http://patchwork.openembedded.org/patch/37453/
> http://patchwork.openembedded.org/patch/37455/
> 
> I had the same issue, but my motivation was mostly because kernel recipe was
> being rebuilt every time, because it depended on initramfs creation
> (do_rootfs) which was changing checksum.

Thanks for the update, I had sent two patches review today:

http://lists.linuxtogo.org/pipermail/openembedded-core/2012-October/031248.html

It seems that they are similar cases, the problem for "bitbake -S" is caused by:
BUILDNAME
DATE
TIME

The DATETIME doesn't break "bitbake -S" since it doesn't immediately expand:

DATETIME = "${DATE}${TIME}

You add to do_rootfs[vardepsexclud], I move them from BB_HASHBASE_WHITELIST or BB_HASHCONFIG_WHITELIST, I'm not sure which is better.
Comment 3 Martin Jansa 2012-10-23 08:29:43 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > See also
> > http://patchwork.openembedded.org/patch/37453/
> > http://patchwork.openembedded.org/patch/37455/
> > 
> > I had the same issue, but my motivation was mostly because kernel recipe was
> > being rebuilt every time, because it depended on initramfs creation
> > (do_rootfs) which was changing checksum.
> 
> Thanks for the update, I had sent two patches review today:
> 
> http://lists.linuxtogo.org/pipermail/openembedded-core/2012-October/031248.
> html

Yes that's why I've noticed this bug, because they look similar to what I've sent.

> You add to do_rootfs[vardepsexclud], I move them from BB_HASHBASE_WHITELIST
> or BB_HASHCONFIG_WHITELIST, I'm not sure which is better.

I'm also not sure.
Comment 4 Martin Jansa 2013-01-09 14:31:16 UTC
Today I got more warnings from bitbake -S

NOTE: Reparsing files to collect dependency data
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb.do_package)!
ERROR: The mismatched hashes were 2f966fc0c3c6728acd2794dd6e8fa6d5 and 8b252828e2cda3fe39487395c273b004
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-devtools/perl/liburi-perl_1.60.bb.do_package)!
ERROR: The mismatched hashes were cd7ab3eda273a4e1dd1e485787addd33 and 4aa77d823b329cfbddcf0b9586e9ffaf
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb.do_package)! 
ERROR: The mismatched hashes were f576450994890e20ba5db68ea9696e84 and 477a8d0cb57f0760394e358600c4df48
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-lsb4/perl/libi18n-collate-perl_1.02.bb.do_package)!   
ERROR: The mismatched hashes were 72fbce66a05899dbdb54bfc3294801f5 and d55f38498b610e15bf87240a3cf2c753
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-extended/perl/libtimedate-perl_1.20.bb.do_package)!   
ERROR: The mismatched hashes were 253eee227ce6b7b39808a3a1c727c537 and f2bb040cb2f23c3c8996784cb7e026af
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb.do_package)!
ERROR: The mismatched hashes were a80c8d126ee2d11b62fd2a87eff0b9ba and 6e6a379c1df76e5a6da336205eefaf09
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-devtools/perl/libxml-perl_0.08.bb.do_package)!
ERROR: The mismatched hashes were b4d55b460395e1d08f8137bbf1e12a6b and 1079aaff5d25e04a33aaf41a210a3ce6
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-lsb4/perl/libclass-isa-perl_0.36.bb.do_package)!
ERROR: The mismatched hashes were 7bd308b673b73ef7f40ac1a0e39cccaf and 6677d74df68a7f78dd59511672fed8d5
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb.do_package)! 
ERROR: The mismatched hashes were a42e2e8afb4e1cfd549d5ff4d9636508 and f4fc9c8d3b74d4ea1086d2d6fcf9f992
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-lsb4/perl/libfile-checktree-perl_4.41.bb.do_package)! 
ERROR: The mismatched hashes were 3d27100afe3f3e919359b561148ae5c1 and 1fae77482c3cd0663be99f3a35de6b2e
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-lsb4/perl/libpod-plainer-perl_1.03.bb.do_package)!
ERROR: The mismatched hashes were 7c8474bc0c51102df526f879470c711b and 209034ddba339a42681bf30342375670
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-lsb4/perl/libdumpvalue-perl_1.17.bb.do_package)!
ERROR: The mismatched hashes were 2c042f19b314e64a99ae8c648fe48013 and 5fb8c40ca57703b5880b9c64490bddd6
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb.do_package)!
ERROR: The mismatched hashes were dc48dce8bbc27af76fa8ae0b82881ab6 and 283effca05ae1025984738dc606d65a4
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-lsb4/perl/libenv-perl_1.03.bb.do_package)!
ERROR: The mismatched hashes were 70d90b97a5b358d0f8fb8bf0ff686802 and 31be4f8610b936f7ecb0b85a9b90e213
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-extended/perl/libconvert-asn1-perl_0.26.bb.do_package)!
ERROR: The mismatched hashes were e43ef4f15fd07c4cef9646c53bf562c0 and 7476dd591dc4a3e42dd518d37f0b656c
ERROR: Bitbake's cached basehash does not match the one we just generated (/home/jenkins/oe/shr-core-branches/shr-core/openembedded-core/meta/recipes-kernel/perf/perf_3.4.bb.do_package)!
ERROR: The mismatched hashes were c2512463c62a835fc9b8798ec2927c1f and d1ecfef1961bb674a2e6d0c7b50c5a29
NOTE: Tasks Summary: Attempted 0 tasks of which 0 didn't need to be rerun and all succeeded.

Summary: There were 32 ERROR messages shown, returning a non-zero exit code.
NOTE: PRServer: stopping...

All related to perl, does perl depend on DATETIME or something like that now?

ERRORs weren't shown when I've executed the same bitbake -S second time.
Comment 6 Robert Yang 2013-01-16 08:26:01 UTC
Hi Martin,

It seems that there are still errors:

ERROR: Bitbake's cached basehash does not match the one we just generated (/buildarea/lyang1/poky/meta/recipes-kernel/linux/linux-yocto_3.4.bb.do_deploy)!
ERROR: The mismatched hashes were 4665bb7cf4750cf6539ce98e0dda5d80 and 20e583865a46ef036050d021d9f96bad
ERROR: Bitbake's cached basehash does not match the one we just generated (/buildarea/lyang1/poky/meta/recipes-sato/images/core-image-sato.bb.do_rootfs)!
ERROR: The mismatched hashes were eccf2f6961122facf8861be4bc18af6d and b9560b60d1d0f93bcb2d2478125b5a39
NOTE: Tasks Summary: Attempted 0 tasks of which 0 didn't need to be rerun and all succeeded.

// Robert

(In reply to comment #5)
> My 2 patches were applied:
>  
> http://git.openembedded.org/openembedded-core/commit/
> ?id=084d16cd00365ac3db9010a2e0e08ec49b50a144
>  
> http://git.openembedded.org/openembedded-core/commit/
> ?id=a78d2d21fffd646a0d6e0f02a8355be010a7bd28"
Comment 7 Martin Jansa 2013-01-17 15:17:27 UTC
kernel still depends on DATETIME

List of dependencies for variable DATETIME is set(['DATE', 'TIME'])
List of dependencies for variable MODULE_IMAGE_BASE_NAME is set(['PR', 'MACHINE', 'PV', 'DATETIME'])
Variable DATETIME value is ${DATE}${TIME}
Variable KERNEL_IMAGE_BASE_NAME value is ${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}
Variable MODULE_IMAGE_BASE_NAME value is modules-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}

I think it got broken by

http://cgit.openembedded.org/openembedded-core/commit/?id=67e77cd948c69798695d5d5f34163ef89339b35a

because he moves DATETIME to different variable but without moving vardepsexclude.
Comment 9 Yi Zhao 2013-04-17 05:50:59 UTC
Verified with branch dylan:fe122663a978f7afdc9d1bb78c9cbf20b213f5e4

No errors and warnings when run "bitbake -S"