Updated for packages

This commit is contained in:
Dimitris Zlatanidis 2022-06-17 20:40:52 +03:00
parent 1735c792c0
commit d3c64af608
2 changed files with 3 additions and 4 deletions

View file

View file

@ -25,20 +25,19 @@ class Check:
''' Checking if the slackbuild exists in the repository. ''' ''' Checking if the slackbuild exists in the repository. '''
for sbo in self.slackbuilds: for sbo in self.slackbuilds:
if not SBoQueries(sbo).slackbuild(): if not SBoQueries(sbo).slackbuild():
raise SystemExit(f'Error: Slackbuild {sbo} does not exists.') raise SystemExit(f'Error: Package {sbo} does not exists.')
def unsupported(self): def unsupported(self):
''' Checking for unsupported slackbuilds. ''' ''' Checking for unsupported slackbuilds. '''
for sbo in self.slackbuilds: for sbo in self.slackbuilds:
sources = SBoQueries(sbo).sources() sources = SBoQueries(sbo).sources()
if 'UNSUPPORTED' in sources: if 'UNSUPPORTED' in sources:
raise SystemExit(f'Error: Slackbuild {sbo} ' raise SystemExit(f'Error: Package {sbo} '
'unsupported by arch.') 'unsupported by arch.')
def installed(self): def installed(self):
''' Checking for installed packages. ''' ''' Checking for installed packages. '''
installed = os.listdir(self.log_packages) for package in os.listdir(self.log_packages):
for package in installed:
for sbo in self.slackbuilds: for sbo in self.slackbuilds:
if sbo + '-' in package and self.repo_tag in package: if sbo + '-' in package and self.repo_tag in package:
return return