summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/sstatesig.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/sstatesig.py')
-rw-r--r--meta/lib/oe/sstatesig.py42
1 files changed, 23 insertions, 19 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 39f9ccf77e..79a410eecb 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -80,6 +80,7 @@ def find_siginfo(pn, taskname, taskhashlist, d):
80 """ Find signature data files for comparison purposes """ 80 """ Find signature data files for comparison purposes """
81 81
82 import fnmatch 82 import fnmatch
83 import glob
83 84
84 if taskhashlist: 85 if taskhashlist:
85 hashfiles = {} 86 hashfiles = {}
@@ -93,27 +94,30 @@ def find_siginfo(pn, taskname, taskhashlist, d):
93 if key.startswith('virtual:native:'): 94 if key.startswith('virtual:native:'):
94 pn = pn + '-native' 95 pn = pn + '-native'
95 96
96 # First search in stamps dir
97 stampdir = d.getVar('TMPDIR', True) + '/stamps'
98 filespec = '%s-*.%s.sigdata.*' % (pn, taskname)
99 filedates = {} 97 filedates = {}
98
99 # First search in stamps dir
100 localdata = d.createCopy()
101 localdata.setVar('MULTIMACH_TARGET_SYS', '*')
102 localdata.setVar('PN', pn)
103 localdata.setVar('PV', '*')
104 localdata.setVar('PR', '*')
105 localdata.setVar('EXTENDPE', '')
106 stamp = localdata.getVar('STAMP', True)
107 filespec = '%s.%s.sigdata.*' % (stamp, taskname)
100 foundall = False 108 foundall = False
101 for root, dirs, files in os.walk(stampdir): 109 import glob
102 for fn in files: 110 for fullpath in glob.glob(filespec):
103 if fnmatch.fnmatch(fn, filespec): 111 match = False
104 fullpath = os.path.join(root, fn) 112 if taskhashlist:
105 match = False 113 for taskhash in taskhashlist:
106 if taskhashlist: 114 if fullpath.endswith('.%s' % taskhash):
107 for taskhash in taskhashlist: 115 hashfiles[taskhash] = fullpath
108 if fn.endswith('.%s' % taskhash): 116 if len(hashfiles) == len(taskhashlist):
109 hashfiles[taskhash] = fullpath 117 foundall = True
110 if len(hashfiles) == len(taskhashlist): 118 break
111 foundall = True 119 else:
112 break 120 filedates[fullpath] = os.stat(fullpath).st_mtime
113 else:
114 filedates[fullpath] = os.stat(fullpath).st_mtime
115 if foundall:
116 break
117 121
118 if len(filedates) < 2 and not foundall: 122 if len(filedates) < 2 and not foundall:
119 # That didn't work, look in sstate-cache 123 # That didn't work, look in sstate-cache