From bcc10c290e9583fda6eb54d45aedaaed829678af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Moreira?= Date: Thu, 5 Mar 2020 19:19:44 -0300 Subject: [PATCH] [improvement][aur] preventing the dependencies checking algorithm to add duplicates --- CHANGELOG.md | 4 ++++ bauh/gems/arch/controller.py | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29dc04c6..c53e6022 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Web - not able to inject javascript fixes ( WhatsApp Web not working) [#74](https://github.com/vinifmor/bauh/issues/74) +### Improvements +- AUR + - preventing the dependencies checking algorithm to add duplicates + ### i18n - Russian ( ru ): - [leoneii](https://github.com/leoneii) - PRs: [#66](https://github.com/vinifmor/bauh/pull/66), [#67](https://github.com/vinifmor/bauh/pull/67), [#68](https://github.com/vinifmor/bauh/pull/68) diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index d2d25124..a698415c 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -553,11 +553,14 @@ class ArchManager(SoftwareManager): return for dep in missing_subdeps: - sorted_deps.append(dep) + if dep not in sorted_deps: + sorted_deps.append(dep) for dep, repo in known_deps.items(): if repo != 'aur': - sorted_deps.append((dep, repo)) + data = (dep, repo) + if data not in sorted_deps: + sorted_deps.append(data) for dep in aur_deps: sorted_deps.append((dep, 'aur'))