distro: refactor BinaryPackage, Repo and Distro into generics for Local and Remote

This commit is contained in:
InsanePrawn 2022-09-01 03:57:54 +02:00
parent dbe3dc91a3
commit bf420a73be
5 changed files with 109 additions and 41 deletions

View file

@ -34,3 +34,14 @@ class BinaryPackage(PackageInfo):
for key, value in zip(pruned_lines[0::2], pruned_lines[1::2]):
desc[key.strip()] = value.strip()
return clss(desc['NAME'], desc['VERSION'], desc['FILENAME'], resolved_url='/'.join([resolved_repo_url, desc['FILENAME']]))
def acquire(self) -> str:
raise NotImplementedError()
class LocalPackage(BinaryPackage):
pass
class RemotePackage(BinaryPackage):
pass