#NEWLINE# @ staticmethod #NEWLINE# def _hash_bundle( bundle ) : #NEWLINE# #INDENT# hasher = sha1 ( ) #NEWLINE# hasher . update ( bundle . rel_path ) #NEWLINE# for abs_path in sorted ( bundle . filemap . keys ( ) ) : #NEWLINE# #INDENT# buildroot_relative_path = os . path . relpath ( f , get_buildroot ( ) ) #NEWLINE# hasher . update ( buildroot_relative_path ) #NEWLINE# hasher . update ( bundle . filemap [ abs_path ] ) #NEWLINE# if os . path . isfile ( abs_path ) : #NEWLINE# #INDENT# hasher . update ( 'e' ) #NEWLINE# with open ( abs_path , 'rb' ) as f : #NEWLINE# #INDENT# hasher . update ( f . read ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return hasher . hexdigest ( )