Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 706186 - sys-apps/portage-2.3.85: strip appears broken when using python 2.7
Summary: sys-apps/portage-2.3.85: strip appears broken when using python 2.7
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 658182 706142
  Show dependency tree
 
Reported: 2020-01-23 18:33 UTC by Jonathan Thibault
Modified: 2020-01-23 21:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Thibault 2020-01-23 18:33:31 UTC
When emerging nvidia-drivers, compile and install phases completed but emerge failed while stripping the kernel modules.

Reproducible: Always

Steps to Reproduce:
1. eselect python set 2 (python 2.7)
2. emerge nvidia-drivers
3. profit
Actual Results:  
...
>>> Source compiled.
 * Skipping make test/check due to ebuild restriction.
>>> Test phase [disabled because of RESTRICT=test]: x11-drivers/nvidia-drivers-390.132-r1

>>> Install x11-drivers/nvidia-drivers-390.132-r1 into /var/tmp/portage/x11-drivers/nvidia-drivers-390.132-r1/image
 * Installing nvidia module
 * Installing nvidia-uvm module
 * Installing nvidia-modeset module
 * Installing nvidia-drm module
>>> Completed installing x11-drivers/nvidia-drivers-390.132-r1 into /var/tmp/portage/x11-drivers/nvidia-drivers-390.132-r1/image

 * Final size of build directory: 417344 KiB (407.5 MiB)
 * Final size of installed tree:  197612 KiB (192.9 MiB)

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version
   /lib/modules/5.4.14-gentoo/video/nvidia-drm.ko
   /lib/modules/5.4.14-gentoo/video/nvidia-uvm.ko
   /lib/modules/5.4.14-gentoo/video/nvidia.ko
   /lib/modules/5.4.14-gentoo/video/nvidia-modeset.ko
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/portage/util/_async/AsyncFunction.py", line 40, in _run
    os.write(self._async_func_reader_pw, pickle.dumps(result))
  File "/usr/lib64/python2.7/pickle.py", line 1380, in dumps
    Pickler(file, protocol).dump(obj)
  File "/usr/lib64/python2.7/pickle.py", line 224, in dump
    self.save(obj)
  File "/usr/lib64/python2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib64/python2.7/pickle.py", line 568, in save_tuple
    save(element)
  File "/usr/lib64/python2.7/pickle.py", line 331, in save
    self.save_reduce(obj=obj, *rv)
  File "/usr/lib64/python2.7/pickle.py", line 401, in save_reduce
    save(args)
  File "/usr/lib64/python2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib64/python2.7/pickle.py", line 568, in save_tuple
    save(element)
  File "/usr/lib64/python2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib64/python2.7/pickle.py", line 606, in save_list
    self._batch_appends(iter(obj))
  File "/usr/lib64/python2.7/pickle.py", line 621, in _batch_appends
    save(x)
  File "/usr/lib64/python2.7/pickle.py", line 306, in save
    rv = reduce(self.proto)
  File "/usr/lib64/python2.7/copy_reg.py", line 77, in _reduce_ex
    raise TypeError("a class that defines __slots__ without "
TypeError: a class that defines __slots__ without defining __getstate__ cannot be pickled

 * Messages for package x11-drivers/nvidia-drivers-390.132-r1:

 * Gentoo supports kernels which are supported by NVIDIA
 * which are limited to the following kernels:
 * <sys-kernel/gentoo-sources-5.4
 * <sys-kernel/vanilla-sources-5.4
 * 
 * You are free to utilize eapply_user to provide whatever
 * support you feel is appropriate, but will not receive
 * support as a result of those changes.
 * 
 * Do not file a bug report about this.
 * 
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/emerge", line 53, in <module>
    retval = emerge_main()
  File "/usr/lib64/python2.7/site-packages/_emerge/main.py", line 1309, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python2.7/site-packages/_emerge/actions.py", line 3358, in run_action
    retval = action_build(emerge_config, spinner=spinner)
  File "/usr/lib64/python2.7/site-packages/_emerge/actions.py", line 563, in action_build
    retval = mergetask.merge()
  File "/usr/lib64/python2.7/site-packages/_emerge/Scheduler.py", line 1020, in merge
    rval = self._merge()
  File "/usr/lib64/python2.7/site-packages/_emerge/Scheduler.py", line 1414, in _merge
    self._main_loop()
  File "/usr/lib64/python2.7/site-packages/_emerge/Scheduler.py", line 1390, in _main_loop
    self._event_loop.run_until_complete(self._main_exit)
  File "/usr/lib64/python2.7/site-packages/portage/util/_eventloop/EventLoop.py", line 831, in run_until_complete
    self.iteration()
  File "/usr/lib64/python2.7/site-packages/portage/util/_eventloop/EventLoop.py", line 285, in iteration
    return self._iteration(*args)
  File "/usr/lib64/python2.7/site-packages/portage/util/_eventloop/EventLoop.py", line 306, in _iteration
    if self._run_timeouts():
  File "/usr/lib64/python2.7/site-packages/portage/util/_eventloop/EventLoop.py", line 601, in _run_timeouts
    if self._run_idle_callbacks():
  File "/usr/lib64/python2.7/site-packages/portage/util/_eventloop/EventLoop.py", line 560, in _run_idle_callbacks
    if x._callback(*x._args):
  File "/usr/lib64/python2.7/site-packages/portage/util/_eventloop/EventLoop.py", line 101, in __call__
    self._callback(*self._args)
  File "/usr/lib64/python2.7/site-packages/_emerge/EbuildPhase.py", line 459, in <lambda>
    future.add_done_callback(lambda future: future.result())
  File "/usr/lib64/python2.7/site-packages/portage/util/futures/futures.py", line 131, in result
    raise self._exception
Exception: pid 28750 crashed or killed, exitcode 1


Expected Results:  
...
>>> Source compiled.
 * Skipping make test/check due to ebuild restriction.
>>> Test phase [disabled because of RESTRICT=test]: x11-drivers/nvidia-drivers-390.132-r1

>>> Install x11-drivers/nvidia-drivers-390.132-r1 into /var/tmp/portage/x11-drivers/nvidia-drivers-390.132-r1/image
 * Installing nvidia module
 * Installing nvidia-uvm module
 * Installing nvidia-modeset module
 * Installing nvidia-drm module
>>> Completed installing x11-drivers/nvidia-drivers-390.132-r1 into /var/tmp/portage/x11-drivers/nvidia-drivers-390.132-r1/image

 * Final size of build directory: 417344 KiB (407.5 MiB)
 * Final size of installed tree:  197612 KiB (192.9 MiB)

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version
   /lib/modules/5.4.14-gentoo/video/nvidia-drm.ko
   /lib/modules/5.4.14-gentoo/video/nvidia-modeset.ko
   /lib/modules/5.4.14-gentoo/video/nvidia.ko
   /lib/modules/5.4.14-gentoo/video/nvidia-uvm.ko

>>> Installing (1 of 1) x11-drivers/nvidia-drivers-390.132-r1::gentoo
 * checking 165 files for package collisions
>>> Merging x11-drivers/nvidia-drivers-390.132-r1 to /
 * >>> SetUID: [chmod go-r] /opt/bin/nvidia-modprobe ...                                                                                                                          [ ok ]
...

Emerges just fine when using python 3.6 ('eselect python set 1' in my case)
Comment 1 Zac Medico gentoo-dev 2020-01-23 18:40:59 UTC
This would have been introduced by the commit from bug 704320:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=d5dbe58beb5a4e73b919c7dbe8ed4d7b75a860f0
Comment 2 Larry the Git Cow gentoo-dev 2020-01-23 19:29:24 UTC
The bug has been referenced in the following commit(s):

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

commit 7c7b1a43285eb93bacc2285207ce8b0bbfd9f9a3
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-01-23 19:12:49 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-01-23 19:28:53 +0000

    TestSonameAtomPickle: new test for bug 706186
    
    Bug: https://bugs.gentoo.org/706186
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/tests/dep/test_soname_atom_pickle.py | 28 ++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
Comment 3 Larry the Git Cow gentoo-dev 2020-01-23 20:42:18 UTC
The bug has been referenced in the following commit(s):

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

commit 27d653052549e5d1880ab68be12f3b82857506fe
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-01-23 20:30:25 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-01-23 20:40:52 +0000

    SonameAtom: implement get/set state methods (bug 706186)
    
    Since SonameAtom instances are immutable, the __getstate__ and
    __setstate__ methods need to be implemented for pickle support.
    
    Bug: https://bugs.gentoo.org/706186
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/dep/soname/SonameAtom.py             | 17 ++++++++++-------
 lib/portage/tests/dep/test_soname_atom_pickle.py |  2 --
 2 files changed, 10 insertions(+), 9 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2020-01-23 21:11:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=112cea7e7269625c68fee63c27ab0c80ff35ad03

commit 112cea7e7269625c68fee63c27ab0c80ff35ad03
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-01-23 21:06:43 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-01-23 21:11:13 +0000

    sys-apps/portage: 2.3.85-r1 revbump for bug 706186
    
    Closes: https://bugs.gentoo.org/706186
    Bug: https://bugs.gentoo.org/706142
    Package-Manager: Portage-2.3.85, Repoman-2.3.20
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest                                        | 1 +
 .../portage/{portage-2.3.85.ebuild => portage-2.3.85-r1.ebuild}  | 9 +++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)