mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 13:45:45 -05:00
distro/package: add parsed _desc to package
This commit is contained in:
parent
3a44cb6d42
commit
c36087308f
1 changed files with 10 additions and 1 deletions
|
@ -17,6 +17,7 @@ class BinaryPackage(PackageInfo):
|
||||||
arch: str
|
arch: str
|
||||||
filename: str
|
filename: str
|
||||||
resolved_url: Optional[str]
|
resolved_url: Optional[str]
|
||||||
|
_desc: Optional[dict[str, str]]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -43,7 +44,15 @@ class BinaryPackage(PackageInfo):
|
||||||
desc = {}
|
desc = {}
|
||||||
for key, value in zip(pruned_lines[0::2], pruned_lines[1::2]):
|
for key, value in zip(pruned_lines[0::2], pruned_lines[1::2]):
|
||||||
desc[key.strip()] = value.strip()
|
desc[key.strip()] = value.strip()
|
||||||
return clss(name=desc['NAME'], version=desc['VERSION'], arch=desc['ARCH'], filename=desc['FILENAME'], resolved_url='/'.join([resolved_repo_url, desc['FILENAME']]))
|
p = clss(
|
||||||
|
name=desc['NAME'],
|
||||||
|
version=desc['VERSION'],
|
||||||
|
arch=desc['ARCH'],
|
||||||
|
filename=desc['FILENAME'],
|
||||||
|
resolved_url='/'.join([resolved_repo_url, desc['FILENAME']]),
|
||||||
|
)
|
||||||
|
p._desc = desc
|
||||||
|
return p
|
||||||
|
|
||||||
def acquire(self) -> str:
|
def acquire(self) -> str:
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
Loading…
Add table
Reference in a new issue