Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 694000

Summary: sys-apps/portage: OwnerSet exclude-files support is broken
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: esigra
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=693980
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 144480, 691278    

Description Zac Medico gentoo-dev 2019-09-10 19:42:58 UTC
The exclude-files support broke in this commit (for bug 524236):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=5ace188b449926dae09aca0a09aea2c2fe216bd7

This will fix it:

> diff --git a/lib/portage/_sets/dbapi.py b/lib/portage/_sets/dbapi.py
> index 299cb8157..b0a03d2f5 100644
> --- a/lib/portage/_sets/dbapi.py
> +++ b/lib/portage/_sets/dbapi.py
> @@ -85,7 +85,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)
Comment 1 Larry the Git Cow gentoo-dev 2019-09-10 20:03:29 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=0509af099b1eb69951936527b73bf0968653e16b

commit 0509af099b1eb69951936527b73bf0968653e16b
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-09-10 19:53:49 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-09-10 19:58:40 +0000

    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>

 lib/portage/_sets/dbapi.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2019-09-12 02:35:42 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39bc8967e254a5c83d5e0e22db6a0b6d772ed01e

commit 39bc8967e254a5c83d5e0e22db6a0b6d772ed01e
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-09-12 02:15:52 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-09-12 02:35:05 +0000

    sys-apps/portage: Bump to version 2.3.76
    
     #693836 erroneous firefox downgrade
     #693980 x11-module-rebuild: support SYMLINK_LIB=no
     #694000 OwnerSet: fix exclude-files support
    
    Bug: https://bugs.gentoo.org/691278
    Bug: https://bugs.gentoo.org/693836
    Bug: https://bugs.gentoo.org/693980
    Bug: https://bugs.gentoo.org/694000
    Package-Manager: Portage-2.3.76, Repoman-2.3.17
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.76.ebuild | 261 +++++++++++++++++++++++++++++++++
 2 files changed, 262 insertions(+)