[oe-commits] [bitbake] 04/11: bitbake-diffsigs: drop naive logic for removing duplicate files

git at git.openembedded.org git at git.openembedded.org
Thu Apr 6 23:51:56 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit f0d7ab259d8ef95643e7229474b7850608aa4426
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Fri Apr 7 09:52:04 2017 +1200

    bitbake-diffsigs: drop naive logic for removing duplicate files
    
    This logic doesn't work in practice, certainly not with current versions
    where sigdata files are preserved in the stamps directory and therefore
    there will often be multiple sigdata files - you can now easily get
    files for the same signature from sstate and the stamps directory with the
    result that bitbake-diffsigs reports nothing has changed. Instead, let's
    change the find_siginfo function in OE-Core to simply not return
    duplicates so we don't have to filter them out here.
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 bin/bitbake-diffsigs | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/bin/bitbake-diffsigs b/bin/bitbake-diffsigs
index f84188d..5400e5b 100755
--- a/bin/bitbake-diffsigs
+++ b/bin/bitbake-diffsigs
@@ -37,12 +37,6 @@ logger = bb.msg.logger_create('bitbake-diffsigs')
 def find_compare_task(bbhandler, pn, taskname):
     """ Find the most recent signature files for the specified PN/task and compare them """
 
-    def get_hashval(siginfo):
-        if siginfo.endswith('.siginfo'):
-            return siginfo.rpartition(':')[2].partition('_')[0]
-        else:
-            return siginfo.rpartition('.')[2]
-
     if not hasattr(bb.siggen, 'find_siginfo'):
         logger.error('Metadata does not support finding signature data files')
         sys.exit(1)
@@ -59,16 +53,6 @@ def find_compare_task(bbhandler, pn, taskname):
         logger.error('Only one matching sigdata file found for the specified task (%s %s)' % (pn, taskname))
         sys.exit(1)
     else:
-        # It's possible that latestfiles contain 3 elements and the first two have the same hash value.
-        # In this case, we delete the second element.
-        # The above case is actually the most common one. Because we may have sigdata file and siginfo
-        # file having the same hash value. Comparing such two files makes no sense.
-        if len(latestfiles) == 3:
-            hash0 = get_hashval(latestfiles[0])
-            hash1 = get_hashval(latestfiles[1])
-            if hash0 == hash1:
-                latestfiles.pop(1)
-
         # Define recursion callback
         def recursecb(key, hash1, hash2):
             hashes = [hash1, hash2]

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list