commit:     c784213c88825f0f3529348f8c0b623e3880bd36
Author:     Thomas Bracht Laumann Jespersen <t <AT> laumann <DOT> xyz>
AuthorDate: Tue Jan 20 20:11:25 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 21 06:03:11 2026 +0000
URL:        https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=c784213c

eclean/search: simplify logic

It seemed redundant to me to have the same statement in two places and
try to think of the different conditions that might lead to
essentially the same behaviour, except in one case.

Signed-off-by: Thomas Bracht Laumann Jespersen <t <AT> laumann.xyz>
Part-of: https://codeberg.org/gentoo/gentoolkit/pulls/3
Signed-off-by: Sam James <sam <AT> gentoo.org>

 pym/gentoolkit/eclean/search.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py
index a304705..0a51ce9 100644
--- a/pym/gentoolkit/eclean/search.py
+++ b/pym/gentoolkit/eclean/search.py
@@ -685,12 +685,9 @@ def findPackages(
                 binpkg_path = bin_dbapi.bintree.getname(drop_cpv)
                 dead_binpkgs.setdefault(binpkg_key, []).append(binpkg_path)
 
-                if new_time >= old_time:
-                    keep_binpkgs[cpv_key] = cpv
-                else:
+                if new_time < old_time:
                     continue
-            else:
-                keep_binpkgs[cpv_key] = cpv
+            keep_binpkgs[cpv_key] = cpv
 
         # Exclude if binpkg exists in the porttree and not --deep
         if not destructive and port_dbapi.cpv_exists(cpv):

Reply via email to