diff --git a/slpkg/slackbuild.py b/slpkg/slackbuild.py index 872928c9..0e9f7c9c 100644 --- a/slpkg/slackbuild.py +++ b/slpkg/slackbuild.py @@ -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)