From 3ea89393e2c9e6bb9d90c0789280ecc7b473c2ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Fri, 9 Aug 2013 21:51:38 +0200 Subject: [PATCH 3/3] Don't stop collision search after 20 files. The first 20 files may not give any matches but still one of the later files may be owned by some package. In this case, FEATURES=protect-owned wouldn't work properly. If we're worried about performance, we should instead stop the search after matching 20 files. --- pym/portage/dbapi/vartree.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 33d8c95..c7c4f98 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3887,11 +3887,6 @@ class dblink(object): msg.append("") eerror(msg) - if len(collisions) > 20: - # get_owners is slow for large numbers of files, so - # don't look them all up. - collisions = collisions[:20] - pkg_info_strs = {} self.lockdb() try: -- 1.8.3.2