Skip to content

Commit

Permalink
fix(pikaur-static: pypyalpm: Package: compute_requiredby, compute_opt…
Browse files Browse the repository at this point in the history
…ionalfor): sort results
  • Loading branch information
actionless committed Sep 16, 2024
1 parent 61fdb66 commit 573b75f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pikaur_static/pypyalpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,26 +141,26 @@ class Package:
isize: int

def compute_requiredby(self) -> list[str]:
return [
return sorted([
pkg.name
for pkg in PackageDB.get_local_list(handle=self.db.handle)
for name in [
self.name,
*(get_package_name_from_depend_line(line) for line in self.provides),
]
if name in [get_package_name_from_depend_line(line) for line in pkg.depends]
]
])

def compute_optionalfor(self) -> list[str]:
return [
return sorted([
pkg.name
for pkg in PackageDB.get_local_list(handle=self.db.handle)
for name in [
self.name,
*(get_package_name_from_depend_line(line) for line in self.provides),
]
if name in [get_package_name_from_depend_line(line) for line in pkg.optdepends]
]
])

def __init__(self) -> None:
for field in DB_INFO_TRANSLATION.values():
Expand Down

0 comments on commit 573b75f

Please sign in to comment.