diff options
author | Zac Medico <zmedico@gentoo.org> | 2019-09-10 12:53:49 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2019-09-10 12:58:40 -0700 |
commit | 0509af099b1eb69951936527b73bf0968653e16b (patch) | |
tree | 7cc43709ebe9af1c93788a3f3624bcc18eee1f43 | |
parent | grab_updates: use key for file name sort (diff) | |
download | portage-0509af099b1eb69951936527b73bf0968653e16b.tar.gz portage-0509af099b1eb69951936527b73bf0968653e16b.tar.bz2 portage-0509af099b1eb69951936527b73bf0968653e16b.zip |
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 <zmedico@gentoo.org>
-rw-r--r-- | lib/portage/_sets/dbapi.py | 7 |
1 files 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) |