This commit is contained in:
Marc Beninca 2021-10-10 21:30:40 +02:00 committed by Marc Beninca
parent 3763dce133
commit 2e366f71f1
6 changed files with 25 additions and 37 deletions

View file

@ -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 = {}