summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/sstatesig.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-24 22:44:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-07 11:18:38 +0100
commita2db4fa127a3347fc6df31f895fb0b552669119e (patch)
treedc7f77f6a2c538586df9d9d6890e3867f5b2cf94 /meta/lib/oe/sstatesig.py
parented9789d54d353af5717fdbedf1c578911b82c247 (diff)
downloadpoky-a2db4fa127a3347fc6df31f895fb0b552669119e.tar.gz
base/bitbake.conf: Enable pseudo path filtering
This is a pretty big change to the way pseudo operates when used in OpenEmbedded. Normally, pseudo monitors and logs (adds to its database) any file created or modified whilst in a fakeroot environment. There are large numbers of files we simply don't care about the permissions of whilst in that fakeroot context, for example ${S}, ${B}, ${T}, ${SSTATE_DIR}, the central sstate control directories, This change uses new functionality in pseudo to ignore these directory trees, resulting in a cleaner database with less chance of "stray" mismatches if files are modified outside pseudo context. It also should reduce some overhead from pseudo as the interprocess round trip to the server is avoided. There is a possible complication where some existing recipe may break, for example, we found a recipe which was writing to "${B}/install" for "make install" in do_install and since we listed ${B} as not to be tracked, there were errors trying to chown root for files in this location. This patch fixes a few corner cases in OE-Core when used with this new ignore list: * The archiver directory matched a "${WORKDIR}/deploy*" pattern so was renamed to something else since that directory does need its root permissions * The ${S} and ${B} ignoring is conditional on them being different to ${WORKDIR} * package_write_* task output (the debs/rpms/ipks) are now owned by the build user so we don't want the file ownership information in the hashequiv outhash calculation even if they are built under pseudo. * The fontcache postinstall intercept is run under qemu outside of pseudo context so delete files it may delete up front where pseudo can see this. * SSTATE_DIR is in PSEUDO_PATHS_IGNORE, which is in FAKEROOTENV which is cached by bitbake. We therefore need to trigger reparsing if this changes, which means SSTATE_DIR can be in BB_HASHBASE_WHITELIST but not BB_HASHCONFIG_WHITELIST. Rework the variables to handle this. This otherwise breaks some of our sstate tests in oe-selftest. * Ignore the temp directory wic uses for rebuilding rootfs. (From OE-Core rev: ad8f5532ffaead9a5ad13e1034fe9e5e1b7979f4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/sstatesig.py')
-rw-r--r--meta/lib/oe/sstatesig.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 21ae0a7657..4b8f264012 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -482,6 +482,8 @@ def OEOuthashBasic(path, sigfile, task, d):
482 h = hashlib.sha256() 482 h = hashlib.sha256()
483 prev_dir = os.getcwd() 483 prev_dir = os.getcwd()
484 include_owners = os.environ.get('PSEUDO_DISABLED') == '0' 484 include_owners = os.environ.get('PSEUDO_DISABLED') == '0'
485 if "package_write_" in task or task == "package_qa":
486 include_owners = False
485 extra_content = d.getVar('HASHEQUIV_HASH_VERSION') 487 extra_content = d.getVar('HASHEQUIV_HASH_VERSION')
486 488
487 try: 489 try: