From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9C837138334 for ; Tue, 10 Sep 2019 20:03:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D4274E086D; Tue, 10 Sep 2019 20:03:33 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BF9D8E086D for ; Tue, 10 Sep 2019 20:03:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AA40434AFB3 for ; Tue, 10 Sep 2019 20:03:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 425FF776 for ; Tue, 10 Sep 2019 20:03:30 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1568145520.0509af099b1eb69951936527b73bf0968653e16b.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/_sets/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/_sets/dbapi.py X-VCS-Directories: lib/portage/_sets/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 0509af099b1eb69951936527b73bf0968653e16b X-VCS-Branch: master Date: Tue, 10 Sep 2019 20:03:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 63a30721-e9f2-412c-ba26-3fbe569ed76e X-Archives-Hash: 188e348d9df11c03d6a87bbd3bdcff16 commit: 0509af099b1eb69951936527b73bf0968653e16b Author: Zac Medico gentoo org> AuthorDate: Tue Sep 10 19:53:49 2019 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Sep 10 19:58:40 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=0509af09 OwnerSet: fix exclude-files support (bug 694000) Paths returned from iter_owners do not include a leading slash since commit 5ace188b4499, therefore it's necessary to prepend a leading slash for comparisons with exclude-files values. Fixes: 5ace188b4499 ("FEATURES=case-insensitive-fs for bug #524236") Bug: https://bugs.gentoo.org/694000 Signed-off-by: Zac Medico gentoo.org> lib/portage/_sets/dbapi.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/portage/_sets/dbapi.py b/lib/portage/_sets/dbapi.py index 299cb8157..5d78fd1d3 100644 --- a/lib/portage/_sets/dbapi.py +++ b/lib/portage/_sets/dbapi.py @@ -67,7 +67,8 @@ class OwnerSet(PackageSet): def mapPathsToAtoms(self, paths, exclude_paths=None): """ - All paths must have $EROOT stripped from the left side. + All paths must begin with a slash, must include EPREFIX, and + must not include ROOT. """ rValue = set() vardb = self._db @@ -85,7 +86,9 @@ class OwnerSet(PackageSet): pkg = pkg_str(link.mycpv, None) atom = "%s:%s" % (pkg.cp, pkg.slot) rValue.add(atom) - if p in exclude_paths: + # Returned paths are relative to ROOT and do not have + # a leading slash. + if '/' + p in exclude_paths: exclude_atoms.add(atom) rValue.difference_update(exclude_atoms)