title: How to solve Taskhash mismatch and metadata is not deterministic in Yocto project build?
body: <p>I am facing &quot;Taskhash mismatch&quot; &amp; &quot;The metadata is not deterministic and this needs to be fixed&quot; error in Yocto project build. This issue arises without any obvious reasons. With a perfectly good source code repo, the build is success sometime, while it fails some time. There is no change in source code/recipe or any other build parameters.</p>
  <p>Error log:</p>
  <pre><code>ERROR: When reparsing /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_populate_lic, the basehash value changed from e0bfa2ad64f24d189d23f9d84918c74a7253e0d7e9c7fea4e3346cbc473d43da to c108c533ec82c43aa15730e4ca9c9838f87133e63417f40af0de8ca8cb43f51a. The metadata is not deterministic and this needs to be fixed.
  ERROR: The following commands may help:
  ERROR: $ bitbake sub_project-rootfs-base -cdo_populate_lic -Snone
  ERROR: Then:
  ERROR: $ bitbake sub_project-rootfs-base -cdo_populate_lic -Sprintdiff
  
  ERROR: sub_project-rootfs-base-1.0+gitAUTOINC+db239d9f5b-r2 do_package_qa: Taskhash mismatch 87d8616452c2be01481a9034e9147f0270a57a3f64f85cde65076863b8123c7c versus 9a7fd3b27e62140001d77ab75dbc2026dac8e6c8ca93a487b1857a76f2b6b2yy for /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_package_qa
  ERROR: Taskhash mismatch 87d8616452c2be01481a9034e9147f0270a57a3f64f85cde65076863b8123c7c versus 9a7fd3b27e62140001d77ab75dbc2026dac8e6c8ca93a487b1857a76f2b6b2yy for /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_package_qa
  ERROR: sub_project-rootfs-base-1.0+gitAUTOINC+db239d9f5b-r2 do_package_write_rpm: Taskhash mismatch 9a7fd3b27e62140001d77ab75dbc2026dac88qc8ca93a487b1857a76f2b6b2yy versus 9a7fd3b27e6217l0001d77ab75dbc2026dac8e6c8ca93a487b1857a76f2b6b2yy for /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_package_write_rpm
  ERROR: Taskhash mismatch 9a7fd3b27e62140001d77ab75dbc2026dac88qc8ca93a487b1857a76f2b6b2yy versus 9a7fd3b27e6217l0001d77ab75dbc2026dac8e6c8ca93a487b1857a76f2b6b2yy for /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_package_write_rpm
  </code></pre>