[bitbake-devel] [PATCH 1/1] lib/bb/checksum: avoid exception on broken symlinks

Paul Eggleton paul.eggleton at linux.intel.com
Wed Jul 27 20:55:30 UTC 2016


On Thu, 28 Jul 2016 08:53:33 Paul Eggleton wrote:
> On Tue, 26 Jul 2016 08:08:42 Richard Purdie wrote:
> > On Tue, 2016-07-26 at 15:36 +1200, Paul Eggleton wrote:
> > > If using OE's externalsrc with a source tree that is not tracked by
> > > git and contains broken symlinks, you can receive "TypeError:
> > > unorderable
> > > 
> > > types: NoneType() < str()" within the file checksum code due to:
> > >  checksums.sort(key=operator.itemgetter(1))
> > > 
> > > Don't add files with no checksum to the checksums list in order to
> > > avoid this.
> > 
> > In some of the cache code we have to note whether files were checked
> > for but didn't exist. This means that if they then do exist in a later
> > run, we know to invalidate the cache.
> > 
> > Does this change break that?
> 
> Took me a couple of days to get back to this, but after double-checking both
> the code and the behaviour the answer is no. As you may recall the file
> checksum operation is broken into two parts:
> 
> 1) Getting the list of files regardless of whether they exist or not, which
> is done at parse time and goes into the cache
> 
> 2) Actually getting the checksum of each file that does exist, which is done
> when we calculate the task hashes. The hashes are also cached in their own
> separate cache file based on mtime.

Sorry, for clarity that should have read "The file checksums are also 
cached..."

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the bitbake-devel mailing list