mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			check in a copy of the arm-pack-manager index and use it
							parent
							
								
									7bcc63b202
								
							
						
					
					
						commit
						167ed2bc12
					
				| 
						 | 
				
			
			@ -16,6 +16,10 @@ from zipfile import ZipFile
 | 
			
		|||
 | 
			
		||||
RootPackURL = "http://www.keil.com/pack/index.idx"
 | 
			
		||||
 | 
			
		||||
LocalPackDir = dirname(__file__)
 | 
			
		||||
LocalPackIndex = join(LocalPackDir, "index.json")
 | 
			
		||||
LocalPackAliases = join(LocalPackDir, "aliases.json")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
protocol_matcher = compile("\w*://")
 | 
			
		||||
def strip_protocol(url) :
 | 
			
		||||
| 
						 | 
				
			
			@ -339,7 +343,8 @@ class Cache () :
 | 
			
		|||
                with open(join(save_data_path('arm-pack-manager'), "index.json")) as i :
 | 
			
		||||
                    self._index = load(i)
 | 
			
		||||
            except IOError :
 | 
			
		||||
                self.generate_index()
 | 
			
		||||
                with open(LocalPackIndex) as i :
 | 
			
		||||
                    self._index = load(i)
 | 
			
		||||
        return self._index
 | 
			
		||||
    @property
 | 
			
		||||
    def aliases(self) :
 | 
			
		||||
| 
						 | 
				
			
			@ -369,7 +374,8 @@ class Cache () :
 | 
			
		|||
                with open(join(save_data_path('arm-pack-manager'), "aliases.json")) as i :
 | 
			
		||||
                    self._aliases = load(i)
 | 
			
		||||
            except IOError :
 | 
			
		||||
                self.generate_aliases()
 | 
			
		||||
                with open(LocalPackAliases) as i :
 | 
			
		||||
                    self._aliases = load(i)
 | 
			
		||||
        return self._aliases
 | 
			
		||||
 | 
			
		||||
    def cache_everything(self) :
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
						 | 
				
			
			@ -6,8 +6,6 @@ import ntpath
 | 
			
		|||
import re
 | 
			
		||||
import json
 | 
			
		||||
 | 
			
		||||
from xdg.BaseDirectory import save_data_path
 | 
			
		||||
 | 
			
		||||
from tools.arm_pack_manager import Cache
 | 
			
		||||
from tools.targets import TARGET_MAP
 | 
			
		||||
from tools.export.exporters import Exporter, TargetNotSupportedException
 | 
			
		||||
| 
						 | 
				
			
			@ -34,9 +32,6 @@ class DeviceCMSIS():
 | 
			
		|||
    Encapsulates target information retrieved by arm-pack-manager"""
 | 
			
		||||
    def __init__(self, target):
 | 
			
		||||
        cache = Cache(True, False)
 | 
			
		||||
        data_path = join(save_data_path('arm-pack-manager'), "index.json")
 | 
			
		||||
        if not exists(data_path) or not self.check_version(data_path):
 | 
			
		||||
            cache.cache_descriptors()
 | 
			
		||||
 | 
			
		||||
        t = TARGET_MAP[target]
 | 
			
		||||
        self.core = t.core
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue