mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-25 09:58:41 +01:00
Updated for circular-dependencies
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
fc0803eef1
commit
50e757a323
3 changed files with 7 additions and 2 deletions
|
@ -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
|
||||||
|
|
|
@ -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))
|
||||||
|
|
|
@ -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))
|
||||||
|
|
Loading…
Reference in a new issue