diff --git a/slpkg/binaries/install.py b/slpkg/binaries/install.py index 644fffc2..17ab4dd7 100644 --- a/slpkg/binaries/install.py +++ b/slpkg/binaries/install.py @@ -61,7 +61,7 @@ class Packages(Configs): self.apply_package_pattern() - def apply_package_pattern(self): + def apply_package_pattern(self) -> None: """ Apply the pattern. """ for pkg in self.packages: if pkg == '*': diff --git a/slpkg/dependees.py b/slpkg/dependees.py index c941a7dd..0d19e324 100644 --- a/slpkg/dependees.py +++ b/slpkg/dependees.py @@ -102,7 +102,7 @@ class Dependees(Configs): if [r for r in req[1].split() if r == pkg]: yield req - def apply_package_pattern(self, repo: str): + def apply_package_pattern(self, repo: str) -> None: """ Apply the pattern. """ for pkg in self.packages: if pkg == '*': diff --git a/slpkg/sbos/slackbuild.py b/slpkg/sbos/slackbuild.py index 7b3bb914..0b892881 100644 --- a/slpkg/sbos/slackbuild.py +++ b/slpkg/sbos/slackbuild.py @@ -65,7 +65,7 @@ class Slackbuilds(Configs): self.apply_package_pattern() - def apply_package_pattern(self): + def apply_package_pattern(self) -> None: """ Apply the pattern. """ for pkg in self.slackbuilds: if pkg == '*': diff --git a/slpkg/tracking.py b/slpkg/tracking.py index 513fa043..6184aac1 100644 --- a/slpkg/tracking.py +++ b/slpkg/tracking.py @@ -82,7 +82,7 @@ class Tracking(Configs): print(f'\n{self.grey}{how_many} dependencies for {package}{self.endc}\n') - def apply_package_pattern(self, packages: list, repo: str): + def apply_package_pattern(self, packages: list, repo: str) -> list: """ Apply the pattern. """ for pkg in packages: if pkg == '*': diff --git a/slpkg/views/view_package.py b/slpkg/views/view_package.py index d288d006..aa671f13 100644 --- a/slpkg/views/view_package.py +++ b/slpkg/views/view_package.py @@ -34,6 +34,16 @@ class ViewPackage(Configs): self.repo_path: Path = self.repos.ponce_repo_path self.repo_tar_suffix: str = '' + @staticmethod + def apply_package_pattern(packages: list) -> list: + """ Apply the pattern. """ + for pkg in packages: + if pkg == '*': + packages.remove(pkg) + packages += SBoQueries('').sbos() + + return packages + def package(self, packages: list) -> None: """ View the packages from the repository. """ color = self.colour() @@ -44,6 +54,8 @@ class ViewPackage(Configs): red: str = color['red'] endc: str = color['endc'] + packages: list = self.apply_package_pattern(packages) + for package in packages: info: list = self.session.query(