From a5da18267966f3d43132e587c4d1be37b8a113bc Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Tue, 24 Sep 2019 16:06:26 -0300 Subject: [PATCH] fix: arch - history status when there are multiple equal versions --- bauh/gems/arch/controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index 5daea64b..38dccd7d 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -314,13 +314,13 @@ class ArchManager(SoftwareManager): commits = git.list_commits(clone_path) if commits: - history, status_idx = [], 0 + history, status_idx = [], -1 for idx, commit in enumerate(commits): with open(pkgbuild_path) as f: pkgdict = aur.map_pkgbuild(f.read()) - if '{}-{}'.format(pkgdict.get('pkgver'), pkgdict.get('pkgrel')) == pkg.version: + if status_idx < 0 and '{}-{}'.format(pkgdict.get('pkgver'), pkgdict.get('pkgrel')) == pkg.version: status_idx = idx history.append({'1_version': pkgdict['pkgver'], '2_release': pkgdict['pkgrel'],