catalog
This commit is contained in:
parent
3763dce133
commit
2e366f71f1
6 changed files with 25 additions and 37 deletions
10
catalog.py
10
catalog.py
|
@ -4,17 +4,21 @@ import tarfile
|
|||
|
||||
import package
|
||||
|
||||
CATALOG = '.files'
|
||||
FILES = 'files'
|
||||
PACKAGE = 'desc'
|
||||
|
||||
|
||||
class Catalog:
|
||||
def __init__(self, binary):
|
||||
self.binary = binary
|
||||
def __init__(self, subsystem):
|
||||
self.subsystem = subsystem
|
||||
self.path = os.path.join(self.subsystem.path,
|
||||
f'{self.subsystem.name}{CATALOG}')
|
||||
self.load()
|
||||
|
||||
def load(self):
|
||||
f = io.BytesIO(self.binary)
|
||||
binary = self.subsystem.architecture.repository.get_file(self.path)
|
||||
f = io.BytesIO(binary)
|
||||
archive = tarfile.open(fileobj=f)
|
||||
m = {}
|
||||
packages = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue