Bug 6639 - only allowed sstate-cache objects are allowed in a build (read-only sstate-cache)
Summary: only allowed sstate-cache objects are allowed in a build (read-only sstate-ca...
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.7
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 1.7 M4
Assignee: Hongxu Jia
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-08-21 02:22 UTC by Hongxu Jia
Modified: 2014-09-26 01:19 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hongxu Jia 2014-08-21 02:22:26 UTC
Issue description:

The issue is that the developer who demand only the "new" software
they write is allowed to be compiled from source, they only want to
reuse binaries from an existed sstate-cache, if the developer makes
a change that triggers a rebuild, it should be an instant error. 

The purpose of this is for the sstate-cache to check if the item
exists or not. If it doesn't the item needs to be in a whitelist
or we need to fail.


Test steps:
1) Create a sstate cache for testing
$ bitbake db

2) Add gzip to SSTATECACHE_WHITELIST, it enabled read-only sstate-cache,
vim local.conf
...
SSTATECACHE_WHITELIST = 'gzip'
...

3) Remove tmp dir and build db from sstate-cache succeed
$ mv tmp tmp-back && bitbake db

4) tweak db's do_configure task by adding comments
--- a/meta/recipes-support/db/db_6.0.30.bb
+++ b/meta/recipes-support/db/db_6.0.30.bb
@@ -27,6 +27,8 @@ LIC_FILES_CHKSUM = "file://../LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490"
@@ -82,6 +84,7 @@ do_configure() {
        gnu-configize --force ${S}
        export STRIP="true"
        oe_runconf
+       echo "hello"
 }

5) build db and there is a build failure
$ bitbake db

6) clean db and there is a clean failure
bitbake db -ccleansstate

7) Append the missing recipe's PN to SSTATECACHE_WHITELIST
vim local.conf
...
SSTATECACHE_WHITELIST = 'gzip db rpm-native gcc-runtime eglibc linux-libc-headers libgcc'
...

8) Build db and clean db succeed
$ bitbake db && bitbake db -ccleansstate
Comment 1 Hongxu Jia 2014-09-26 01:19:48 UTC
We use locked sstate to instead