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 sort the output of the search command (Thanks to marav)
* Updated the gnome mirror (Thanks to rizitis)
* Updated to avoid circular-dependencies
- Added:
* Total file size with find command

View file

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

View file

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