mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 15:27:17 +00:00
parent
25eee9ca5e
commit
9d7f63e549
@ -25,6 +25,7 @@ from typing import Any, Callable, Generator, Set
|
||||
|
||||
from ahriman.core.configuration import Configuration
|
||||
from ahriman.core.log import LazyLogging
|
||||
from ahriman.core.util import trim_package
|
||||
from ahriman.models.repository_paths import RepositoryPaths
|
||||
|
||||
|
||||
@ -175,8 +176,10 @@ class Pacman(LazyLogging):
|
||||
result: Set[str] = set()
|
||||
for database in self.handle.get_syncdbs():
|
||||
for package in database.pkgcache:
|
||||
result.add(package.name) # package itself
|
||||
result.update(package.provides) # provides list for meta-packages
|
||||
# package itself
|
||||
result.add(package.name)
|
||||
# provides list for meta-packages
|
||||
result.update(trim_package(provides) for provides in package.provides)
|
||||
|
||||
return result
|
||||
|
||||
|
@ -207,3 +207,4 @@ def test_packages_with_provides(pacman: Pacman) -> None:
|
||||
package list must contain provides packages
|
||||
"""
|
||||
assert "sh" in pacman.packages()
|
||||
assert "mysql" in pacman.packages() # mariadb
|
||||
|
Loading…
Reference in New Issue
Block a user