FileChecksumCache: don't follow directory symlinks
PATCH 1/1 FileChecksumCache: don't follow directory symlinks
Before this patch, directory symlinks mathcing filename pattern (either a file name or a glob pattern) were followed. However, directory symlinks deeper in the search chain were omitted by os.walk(). Now directory traversal behaves consistently, ignoring syminks on all levels.
One reason for choosing not to "walk into" directory symlinks is that dir symlinks in externalsrc.bbclass in oe-core are causing problems in source tree checksumming.
[YOCTO #8853]
--- lib/bb/checksum.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
lib/bb/checksum.py +5 -2
@@ -123,11 +123,14 @@ class FileChecksumCache(MultiProcessCache): # Handle globs for f in glob.glob(pth): if os.path.isdir(f): - checksums.extend(checksum_dir(f)) + if os.path.islink(f): + continue + else: + checksums.extend(checksum_dir(f)) else: checksum = checksum_file(f) checksums.append((f, checksum)) - elif os.path.isdir(pth): + elif os.path.isdir(pth) and not os.path.islink(f): checksums.extend(checksum_dir(pth)) else: checksum = checksum_file(pth)
Signature · 1 line
2.6.2
PATCH 1/1 Make BB_DONT_CACHE variable external
This makes it possible to prevent a recipe to be cached, and thus, parsed every time.
Use with care.
[YOCTO #8853]
Signed-off-by Markus Lehtonen <[email protected]>
--- lib/bb/cache.py | 2 +- lib/bb/fetch2/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
lib/bb/cache.py +1 -1
@@ -99,7 +99,7 @@ class CoreRecipeInfo(RecipeInfoCommon): self.timestamp = bb.parse.cached_mtime(filename) self.variants = self.listvar('__VARIANTS', metadata) + [''] self.appends = self.listvar('__BBAPPEND', metadata) - self.nocache = self.getvar('__BB_DONT_CACHE', metadata) + self.nocache = self.getvar('BB_DONT_CACHE', metadata) self.skipreason = self.getvar('__SKIPPED', metadata) if self.skipreason:
lib/bb/fetch2/__init__.py +1 -1
@@ -713,7 +713,7 @@ def subprocess_setup(): def get_autorev(d): # only not cache src rev in autorev case if d.getVar('BB_SRCREV_POLICY', True) != "cache": - d.setVar('__BB_DONT_CACHE', '1') + d.setVar('BB_DONT_CACHE', '1') return "AUTOINC" def get_srcrev(d, method_name='sortable_revision'):
Signature · 1 line
2.6.2