Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 656750 - sys-apps/portage-2.3.40: PollSelectAdapter has no attribute close
Summary: sys-apps/portage-2.3.40: PollSelectAdapter has no attribute close
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: PPC OS X
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 651804
  Show dependency tree
 
Reported: 2018-05-28 15:08 UTC by Fabian Groffen
Modified: 2018-06-06 16:33 UTC (History)
1 user (show)

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 Fabian Groffen gentoo-dev 2018-05-28 15:08:56 UTC
>>> sys-apps/gentoo-functions-0.12 merged.
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.
Traceback (most recent call last):
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/tmp/usr/bin/emerge", line 91, in <module>
    global_event_loop().close()
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/tmp/usr/lib/portage/pym/portage/util/_eventloop/EventLoop.py", line 971, in close
    close = getattr(self._poll_obj, 'close')
AttributeError: 'PollSelectAdapter' object has no attribute 'close'


It can be reproduced easily:
% bootstrap32-20180528/tmp/usr/bin/emerge ---version
!!! '---version' is not a valid package atom.
!!! Please check ebuild(5) for full details.
Traceback (most recent call last):
  File "bootstrap32-20180528/tmp/usr/bin/emerge", line 91, in <module>
    global_event_loop().close()
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/tmp/usr/lib/portage/pym/portage/util/_eventloop/EventLoop.py", line 971, in close
    close = getattr(self._poll_obj, 'close')
AttributeError: 'PollSelectAdapter' object has no attribute 'close'


Portage 2.3.40-prefix (python 2.7.3-final-0, prefix/darwin/macos/10.5/ppc, [unavailable], unavailable, 9.8.0 Power Macintosh)
=================================================================
System uname: Darwin-9.8.0-Power_Macintosh-powerpc-32bit
Timestamp of repository gentoo_prefix: Sat, 26 May 2018 00:59:28 +0000
Head commit of repository gentoo_prefix: 6436f55bcb5149bade800eed76abf68088237476
sh bash
distcc 2.18.5-Apple.1 i386-apple-darwin9.0 (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:      4.3_p48-r1::gentoo_prefix
dev-util/pkgconfig:   0.29.2::gentoo_prefix
sys-devel/gcc-config: 1.9.1::gentoo_prefix
Comment 1 Fabian Groffen gentoo-dev 2018-05-28 15:11:21 UTC
I solved this by changing the getattr call like this:

            close = getattr(self._poll_obj, 'close', None)

(e.g. adding the default value of None, so the next if handles the case)
Comment 2 Michael Haubenwallner (RETIRED) gentoo-dev 2018-05-28 15:15:16 UTC
seems this is already fixed in
https://gitweb.gentoo.org/proj/portage.git/commit/?id=4fb5ef2ce2cb27ae155a25bfa5a4666597afb6ac
Comment 3 Fabian Groffen gentoo-dev 2018-05-28 15:18:03 UTC
crap, thanks.
Comment 4 Zac Medico gentoo-dev 2018-05-28 16:35:55 UTC
The bug has been referenced in the following commit(s):

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

commit 4fb5ef2ce2cb27ae155a25bfa5a4666597afb6ac
Author: Zac Medico <zmedico@gentoo.org>
Date:   2018-05-26 13:20:06 -0700

    EventLoop.close: fix 'AttributeError: close' for python2
    
    For python2 without epoll, fix handling of missing
    'close' attribute on self._poll_obj.
    
    Fixes: 4095be74985c ("Add ForkExecutor (bug 649588)")
    Reported-by: Brian Evans <grknight@gentoo.org>

 pym/portage/util/_eventloop/EventLoop.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ba3bcfcfb90e683e504881d24b6bed496ad65b1

commit 4ba3bcfcfb90e683e504881d24b6bed496ad65b1
Author: Zac Medico <zmedico@gentoo.org>
Date:   2018-05-26 13:42:25 -0700

    sys-apps/portage: fix 'AttributeError: close' for python2 without epoll
    
    See: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4fb5ef2ce2cb27ae155a25bfa5a4666597afb6ac
    Reported-by: Brian Evans <grknight@gentoo.org>
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-apps/portage/portage-2.3.40.ebuild | 4 ++++
 1 file changed, 4 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2018-06-06 16:33:31 UTC
The bug has been closed via the following commit(s):

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

commit cfe44e894ae844ab8768dfd5584506750d0be297
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-06-06 16:26:12 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-06-06 16:27:21 +0000

    sys-apps/portage: 2.3.40-r1 revbump for regression fixes
    
    Fixes: https://bugs.gentoo.org/656610
    Fixes: https://bugs.gentoo.org/656750
    Fixes: https://bugs.gentoo.org/656942
    Fixes: https://bugs.gentoo.org/657360
    Fixes: https://bugs.gentoo.org/657420
    Fixes: https://bugs.gentoo.org/657436
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-apps/portage/{portage-2.3.40.ebuild => portage-2.3.40-r1.ebuild} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)