fix: handle shared database proof and stale generated cell libraries
This commit is contained in:
1 parent
4fb978ee21
commit
8e0f78979a
8 files changed
+378
-5
No files matched your search
@@ -8,18 +8,22 @@ def session_resource_scope(job):
|
||||
project, pcb = job.get('project'), job.get('pcb')
|
||||
projects = [str(Path(project))] if project else []
|
||||
databases = [str(Path(p).parent/'database') for p in (project, pcb) if p]
|
||||
shared = library.parent/'SymbolLibs/__ReusableBlocksSymb'
|
||||
shared = shared_symbol_database(library)
|
||||
return {'scope_state': 'DECLARED' if project else 'RECHECK_REQUIRED',
|
||||
'library': str(library), 'operation_id': job.get('operation_id'),
|
||||
'block_name': job.get('block'), 'projects': projects,
|
||||
'databases': list(dict.fromkeys(databases)), 'shared_dependencies': [str(shared)]}
|
||||
|
||||
|
||||
def shared_symbol_database(library):
|
||||
return Path(library).parent/'SymbolLibs/__ReusableBlocksSymb'
|
||||
|
||||
|
||||
def database_directories(lmc_file, project, pcb):
|
||||
return tuple(dict.fromkeys((
|
||||
Path(project).parent/'database',
|
||||
Path(pcb).parent/'database',
|
||||
Path(lmc_file).parent/'SymbolLibs/__ReusableBlocksSymb',
|
||||
shared_symbol_database(lmc_file),
|
||||
)))
|
||||
|
||||
|
||||
@@ -37,6 +41,9 @@ def inspect_release_addresses(snapshot, *, stop=None):
|
||||
from .library_lock import LibraryBusy
|
||||
results = []
|
||||
for item in snapshot['inspection_targets']:
|
||||
if item.get('scope') == 'shared_symbols':
|
||||
raise LibraryBusy('SHARED_ICDB_INSPECTION_UNAVAILABLE: 共享符号库地址需要原生核对:'
|
||||
+ item['address'])
|
||||
target = RepairTarget(Path(item['project']), Path(item['database']))
|
||||
root = Path(tempfile.mkdtemp(prefix='cbb-release-inspection-'))
|
||||
result = run_native_repair(target, root, inspection_only=True, stop=stop)
|
||||
|
||||
Reference in new issue
Block a user