Updated for skip installed option

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-10-09 20:25:07 +03:00
parent 45fd754786
commit 671f171ee2

View file

@ -75,8 +75,16 @@ class Slackbuilds:
''' List with the dependencies. '''
for deps in self.sbos.values():
for dep in deps:
# Checks if the package was installed and skipped.
pkg = f'{dep}-{SBoQueries(dep).version()}'
if ('--skip-installed' in self.flags and
self.utils.is_installed(f'{pkg}-')):
continue
if dep not in self.slackbuilds:
self.dependencies.append(dep)
# Remove duplicate packages and keeps the order.
self.dependencies = list(OrderedDict.fromkeys(self.dependencies))
self.install_order.extend(self.dependencies)
@ -90,13 +98,6 @@ class Slackbuilds:
wget = Wget()
for sbo in self.install_order:
# Checks if the package was installed and skipped.
pkg = f'{sbo}-{SBoQueries(sbo).version()}'
if ('--skip-installed' in self.flags and
self.utils.is_installed(f'{pkg}-')):
print(f'Package {pkg} skipped.')
continue
file = f'{sbo}{self.tar_suffix}'
self.utils.remove_file_if_exists(self.tmp_slpkg, file)