Updated for circular-dependencies

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2024-05-06 18:22:22 +03:00
parent fc0803eef1
commit 50e757a323
3 changed files with 7 additions and 2 deletions

View file

@ -11,6 +11,7 @@
* Updated for check gpg key imported * Updated for check gpg key imported
* Updated for sort the output of the search command (Thanks to marav) * Updated for sort the output of the search command (Thanks to marav)
* Updated the gnome mirror (Thanks to rizitis) * Updated the gnome mirror (Thanks to rizitis)
* Updated to avoid circular-dependencies
- Added: - Added:
* Total file size with find command * Total file size with find command

View file

@ -47,9 +47,11 @@ class Required:
# Resolve dependencies for some special repos. # Resolve dependencies for some special repos.
if not self.full_requires: if not self.full_requires:
for require in requires: for require in requires:
sub_requires: list[str] = self.remove_deps(self.data[require]['requires']) sub_requires: list[str] = self.remove_deps(self.data[require]['requires'])
for sub in sub_requires: for sub in sub_requires:
requires.append(sub) if sub not in requires:
requires.append(sub)
requires.reverse() requires.reverse()
dependencies: tuple = tuple(dict.fromkeys(requires)) dependencies: tuple = tuple(dict.fromkeys(requires))

View file

@ -22,9 +22,11 @@ def resolve_requires(data: dict, name: str, flags: list) -> tuple:
if not utils.is_option(('-O', '--resolve-off'), flags): if not utils.is_option(('-O', '--resolve-off'), flags):
requires: list[str] = data[name]['requires'] requires: list[str] = data[name]['requires']
for require in requires: for require in requires:
sub_requires: list[str] = data[require]['requires'] sub_requires: list[str] = data[require]['requires']
for sub in sub_requires: for sub in sub_requires:
requires.append(sub) if sub not in requires:
requires.append(sub)
requires.reverse() requires.reverse()
dependencies: tuple = tuple(dict.fromkeys(requires)) dependencies: tuple = tuple(dict.fromkeys(requires))