[issue7408] test_distutils fails on Mac OS X 10.5

David Bolen report at bugs.python.org
Sun Nov 29 22:01:45 CET 2009


David Bolen <db3l.net at gmail.com> added the comment:

I don't think its OSX specific.  My FreeBSD slaves (both 6.4 and 7.2)
have been getting the same error recently (sounds like probably around
the same time frame).  The error always seems to be that member.gid (0)
is not matching os.getgid (1001).  The os.getgid call is correct in
terms of that being the group under which the build slave is running.

In digging a little deeper I think the the generated distribution is
behaving correctly, just not how the test is expecting.  On my FreeBSD
systems (and my personal OSX 10.4 system for that matter), if I make a
directory in /tmp it gets my UID, but a GID of 0 (wheel).  Whether
that's because my id is also in the wheel group or because of the sticky
bit on /tmp I'm not totally sure.  Maybe it needs both (/tmp is sticky
on my Ubuntu system but my id is not in the root group, and this doesn't
happen).

So the files being created for the second half of this test are placed
in a temporary folder with a group of wheel(0), and the files appear to
get the same ownership.  This doesn't happen elsewhere, but appears to
be special behavior beneath tmp.

Perhaps if the test did a comparison to the UID/GID of tmp_dir rather
than os.getuid()/os.getgid() it would better reflect that the tarfile
was being built with the same ownership as found in the filesystem. 
Whether that's the correct ownership is a separate question, but as long
as distutils is accurately reflecting that it shouldn't be a failure on
a distutils test.

-- David

----------
nosy: +db3l

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7408>
_______________________________________


More information about the Python-bugs-list mailing list