(self)
| 167 | self._changed_files = changed_files |
| 168 | |
| 169 | def execute(self): |
| 170 | cache_path = os.path.join(self._config['build_cache_dir'], 'stat_cache.json') |
| 171 | stat_cache = load_json_cache(cache_path) |
| 172 | |
| 173 | for module, file_dict in self._changed_files.iteritems(): |
| 174 | for key, files in file_dict.iteritems(): |
| 175 | if key != 'apt': |
| 176 | for fpath in files: |
| 177 | if not fpath.startswith(self._config['build_cache_dir']) and os.path.exists(fpath): |
| 178 | self.debug('refresh {} stat'.format(fpath)) |
| 179 | os.utime(fpath, None) |
| 180 | if fpath not in stat_cache[module]: |
| 181 | stat_cache[module][fpath] = {} |
| 182 | |
| 183 | stat_cache[module][fpath]['mtime'] = os.path.getmtime(fpath) |
| 184 | stat_cache[module][fpath]['md5'] = get_md5(fpath) |
| 185 | |
| 186 | write_json_cache(cache_path, stat_cache) |
| 187 | |
| 188 | |
| 189 | class DirectoryFinder(object): |
nothing calls this directly
no test coverage detected