예제 #1
0
파일: unpack.py 프로젝트: AddRef/TheEngine
 def _file_requires_unpack(self, input_file, output_dir, cache, config_entry):
     if cache:
         output_dir = archive.get_output_path(input_file, output_dir)
         input_file_changed = cache.entry_has_changed(input_file)
         output_dir_changed = False
         if not config_entry or self._is_destination_cache_enabled(config_entry):
             output_dir_changed = not os.path.exists(output_dir) or cache.entry_has_changed(output_dir)
         if input_file_changed:
             g_log.info("File %s has changed" % input_file)
         if output_dir_changed:
             g_log.info("Output directory %s has changed" % output_dir)
         return input_file_changed or output_dir_changed
     g_log.info("Cache is not found so we need to unpack")
     return True
예제 #2
0
파일: unpack.py 프로젝트: AddRef/TheEngine
 def _update_cache(self, input_file, output_dir, cache, config_entry):
     if cache:
         if not config_entry or self._is_destination_cache_enabled(config_entry):
             cache.update_entry(archive.get_output_path(input_file, output_dir))
         cache.update_entry(input_file)
         cache.flush()
예제 #3
0
파일: unpack.py 프로젝트: AddRef/TheEngine
 def _unpack_file(self, input_file, output_dir):
     g_log.info("Extracting %s to %s..." % (input_file, output_dir))
     self._remove_file(archive.get_output_path(input_file, output_dir))
     archive.unpack(input_file, output_dir)
     g_log.info("Extracting %s... DONE" % (input_file))