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

Bug 693980

Summary: sys-apps/portage - @x11-module-rebuild doesn't work for amd64
Product: Portage Development Reporter: Ben Kohler <bkohler>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: corbinbird, esigra, ostroffjh
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=694000
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 144480, 506276, 691278    

Description Ben Kohler gentoo-dev 2019-09-10 13:14:59 UTC
I'm not sure when or where things changed, but the @x11-module-rebuild set which matches "files = /usr/lib/xorg/modules" [1] no longer works on amd64.  On amd64 these packages install modules to /usr/lib64, not /usr/lib.

[1] https://gitweb.gentoo.org/proj/portage.git/tree/cnf/sets/portage.conf#n79


~ # emerge -pv @x11-module-rebuild

These are the packages that would be merged, in order:

[ebuild   R    ] x11-base/xorg-server-1.20.5:0/1.20.5::gentoo  USE="glamor ipv6 kdrive suid systemd udev xorg -debug -dmx -doc (-elogind) -libressl -minimal (-selinux) -static-libs -unwind -wayland -xcsecurity -xephyr -xnest -xvfb" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
~ # qlist -I xf86-
x11-drivers/xf86-input-evdev
x11-drivers/xf86-input-libinput
x11-drivers/xf86-input-synaptics
~ #
Comment 1 Zac Medico gentoo-dev 2019-09-10 18:04:38 UTC
There's also a bug in the handling of the @x11-module-rebuild "exclude-files = /usr/bin/Xorg" setting that's fixed by this patch:

> 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)

I want to find out when and how this broke, and want to consider possible $EPREFIX support carefully.
Comment 2 Zac Medico gentoo-dev 2019-09-10 19:39:20 UTC
The exclude-files support broke in this commit (for bug 524236) which removed the leading slash from search results:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=5ace188b449926dae09aca0a09aea2c2fe216bd7
Comment 3 Zac Medico gentoo-dev 2019-09-10 20:21:44 UTC
The libdir can take a few different values:

> LIBDIR_alpha="lib"
> LIBDIR_amd64_fbsd="lib"
> LIBDIR_amd64="lib"
> LIBDIR_amd64="lib64"
> LIBDIR_arm64="lib"
> LIBDIR_arm64="lib64"
> LIBDIR_arm="lib"
> LIBDIR_hppa="lib"
> LIBDIR_ia64="lib"
> LIBDIR_lp64d="lib64/lp64d"
> LIBDIR_lp64="lib64/lp64"
> LIBDIR_m68k="lib"
> LIBDIR_n32="lib32"
> LIBDIR_n64="lib64"
> LIBDIR_o32="lib"
> LIBDIR_ppc64="lib"
> LIBDIR_ppc64="lib64"
> LIBDIR_ppc="lib"
> LIBDIR_s390="lib"
> LIBDIR_s390x="lib64"
> LIBDIR_sh="lib"
> LIBDIR_sparc32="lib"
> LIBDIR_sparc64="lib64"
> LIBDIR_x32="libx32"
> LIBDIR_x86_fbsd="lib"
> LIBDIR_x86_fbsd="lib32"
> LIBDIR_x86="lib"
> LIBDIR_x86="lib32"

We should probably use a command like this:

> $ pkg-config --variable=moduledir xorg-server
> /usr/lib64/xorg/modules
Comment 5 Larry the Git Cow gentoo-dev 2019-09-12 02:28:00 UTC
The bug has been referenced in the following commit(s):

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

commit b1342ac2c83b4a1b0415eb5fcc4dd1d6c65561d8
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-09-11 01:52:35 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-09-12 01:53:13 +0000

    x11-module-rebuild: support SYMLINK_LIB=no (bug 693980)
    
    Use a lib* glob to support SYMLINK_LIB=no.
    
    Bug: https://bugs.gentoo.org/693980
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 cnf/sets/portage.conf         |  2 +-
 lib/portage/_sets/__init__.py |  2 +-
 lib/portage/_sets/dbapi.py    | 15 ++++++++++++---
 3 files changed, 14 insertions(+), 5 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2019-09-12 02:35:48 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(+)
Comment 7 Corbin 2019-09-19 16:05:15 UTC
Using sys-apps/portage-2.3.76 on amd64 the output is :

emerge -pv @x11-module-rebuild

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-drivers/xf86-video-intel-2.99.917_p20190301::gentoo  USE="dri sna udev -debug -tools -uxa -xvmc" 0 KiB
[ebuild   R    ] x11-drivers/xf86-input-keyboard-1.9.0::gentoo  0 KiB
[ebuild   R    ] x11-drivers/xf86-input-libinput-0.28.2::gentoo  0 KiB
[ebuild   R    ] x11-drivers/xf86-input-mouse-1.9.3::gentoo  0 KiB
[ebuild   R    ] x11-drivers/xf86-video-amdgpu-19.0.1::gentoo  USE="udev" 0 KiB

It is NOT pulling in 'x11-base/xorg-server' now.

Background Forum thread :
https://forums.gentoo.org/viewtopic-p-8371648.html#8371648
Comment 8 Zac Medico gentoo-dev 2019-09-19 17:55:09 UTC
(In reply to Corbin from comment #7)
> Using sys-apps/portage-2.3.76 on amd64 the output is :
> 
> emerge -pv @x11-module-rebuild
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> [ebuild   R    ] x11-drivers/xf86-video-intel-2.99.917_p20190301::gentoo 
> USE="dri sna udev -debug -tools -uxa -xvmc" 0 KiB
> [ebuild   R    ] x11-drivers/xf86-input-keyboard-1.9.0::gentoo  0 KiB
> [ebuild   R    ] x11-drivers/xf86-input-libinput-0.28.2::gentoo  0 KiB
> [ebuild   R    ] x11-drivers/xf86-input-mouse-1.9.3::gentoo  0 KiB
> [ebuild   R    ] x11-drivers/xf86-video-amdgpu-19.0.1::gentoo  USE="udev" 0
> KiB
> 
> It is NOT pulling in 'x11-base/xorg-server' now.
> 
> Background Forum thread :
> https://forums.gentoo.org/viewtopic-p-8371648.html#8371648

Yes, that's the intention of @x11-module-rebuild, as explained here:

https://forums.gentoo.org/viewtopic-p-8371658.html?sid=ee941fb9c3979eea2b352d507fe92064#8371658