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

Bug 288025

Summary: portage dependency on statvfs (FreeMiNT)
Product: Gentoo/Alt Reporter: Alan Hourihane <alanh>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED FIXED    
Severity: critical CC: dev-portage
Priority: High    
Version: unspecified   
Hardware: All   
OS: FreeMiNT   
Whiteboard:
Package list:
Runtime testing required: ---

Description Alan Hourihane 2009-10-07 09:44:32 UTC
Seems as though this line has crept into portage usr/lib/portage/pym/portage/__init__.py....

id(_os.statvfs)          : _os.statvfs,

Yet, later in that file the presence of statvfs is detected with hasattr()....

if size is not None and hasattr(os, "statvfs"):

and so portage blows up with the initial id() line above because it's never checked on hosts that don't have statvfs.

Removing the id() line makes things work here.
Comment 1 Fabian Groffen gentoo-dev 2009-10-10 10:34:44 UTC
@zmedico: how best to solve this?  I started a patch, but it feels like statvfs needs to be in the _os_overrides thing for platforms that do have it.  If I understand the code correctly, the hasattr works on the _unicode_module_wrapper object.
Comment 2 Zac Medico gentoo-dev 2009-10-10 10:41:52 UTC
I added a hasattr() call in svn r14553.
Comment 3 Fabian Groffen gentoo-dev 2009-10-10 10:53:52 UTC
Ok, thanks zmedico.  I merged this and released it as portage-2.2.00.14555.