diff --git a/slpkg/binaries/install.py b/slpkg/binaries/install.py index f9b1cd99..f6b74f9f 100644 --- a/slpkg/binaries/install.py +++ b/slpkg/binaries/install.py @@ -4,6 +4,7 @@ import os import time import subprocess +from collections import OrderedDict from multiprocessing import Process from slpkg.configs import Configs @@ -78,8 +79,6 @@ class Packages(Configs): def dependencies(self): """ Creating the dependencies list and the order for install. """ - requires: list = [] - if not self.utils.is_option(self.flag_resolve_off, self.flags): for pkg in self.packages: @@ -92,11 +91,7 @@ class Packages(Configs): self.packages_requires += Required(self.data, pkg, self.repo).resolve() # Clean dependencies from the dependencies list if already added with main packages. - for req in self.packages_requires: - if req not in self.packages: - requires.append(req) - - requires = list(set(requires)) + requires = list(OrderedDict.fromkeys(self.packages_requires)) if requires: self.packages_requires = self.choose_dependencies(requires)