mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-27 19:58:21 +01:00
Updated for package pattern
This commit is contained in:
parent
973f7b1ab4
commit
78fc0a79d3
5 changed files with 16 additions and 4 deletions
|
@ -61,7 +61,7 @@ class Packages(Configs):
|
||||||
|
|
||||||
self.apply_package_pattern()
|
self.apply_package_pattern()
|
||||||
|
|
||||||
def apply_package_pattern(self):
|
def apply_package_pattern(self) -> None:
|
||||||
""" Apply the pattern. """
|
""" Apply the pattern. """
|
||||||
for pkg in self.packages:
|
for pkg in self.packages:
|
||||||
if pkg == '*':
|
if pkg == '*':
|
||||||
|
|
|
@ -102,7 +102,7 @@ class Dependees(Configs):
|
||||||
if [r for r in req[1].split() if r == pkg]:
|
if [r for r in req[1].split() if r == pkg]:
|
||||||
yield req
|
yield req
|
||||||
|
|
||||||
def apply_package_pattern(self, repo: str):
|
def apply_package_pattern(self, repo: str) -> None:
|
||||||
""" Apply the pattern. """
|
""" Apply the pattern. """
|
||||||
for pkg in self.packages:
|
for pkg in self.packages:
|
||||||
if pkg == '*':
|
if pkg == '*':
|
||||||
|
|
|
@ -65,7 +65,7 @@ class Slackbuilds(Configs):
|
||||||
|
|
||||||
self.apply_package_pattern()
|
self.apply_package_pattern()
|
||||||
|
|
||||||
def apply_package_pattern(self):
|
def apply_package_pattern(self) -> None:
|
||||||
""" Apply the pattern. """
|
""" Apply the pattern. """
|
||||||
for pkg in self.slackbuilds:
|
for pkg in self.slackbuilds:
|
||||||
if pkg == '*':
|
if pkg == '*':
|
||||||
|
|
|
@ -82,7 +82,7 @@ class Tracking(Configs):
|
||||||
|
|
||||||
print(f'\n{self.grey}{how_many} dependencies for {package}{self.endc}\n')
|
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. """
|
""" Apply the pattern. """
|
||||||
for pkg in packages:
|
for pkg in packages:
|
||||||
if pkg == '*':
|
if pkg == '*':
|
||||||
|
|
|
@ -34,6 +34,16 @@ class ViewPackage(Configs):
|
||||||
self.repo_path: Path = self.repos.ponce_repo_path
|
self.repo_path: Path = self.repos.ponce_repo_path
|
||||||
self.repo_tar_suffix: str = ''
|
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:
|
def package(self, packages: list) -> None:
|
||||||
""" View the packages from the repository. """
|
""" View the packages from the repository. """
|
||||||
color = self.colour()
|
color = self.colour()
|
||||||
|
@ -44,6 +54,8 @@ class ViewPackage(Configs):
|
||||||
red: str = color['red']
|
red: str = color['red']
|
||||||
endc: str = color['endc']
|
endc: str = color['endc']
|
||||||
|
|
||||||
|
packages: list = self.apply_package_pattern(packages)
|
||||||
|
|
||||||
for package in packages:
|
for package in packages:
|
||||||
|
|
||||||
info: list = self.session.query(
|
info: list = self.session.query(
|
||||||
|
|
Loading…
Add table
Reference in a new issue