Commits

Christian Hudon committed e69d8fd

Tar on MacOSX and the FreeBSDs does not support setting the uid and gid. Don't fail test because of that on these platform. Also warn when this is happening in package() function.

Comments (0)

Files changed (2)

pypy/tool/release/package.py

         else:
             archive = str(builddir.join(name + '.tar.bz2'))
             if sys.platform == 'darwin' or sys.platform.startswith('freebsd'):
+                print >>sys.stderr, """Warning: tar on current platform does not suport overriding the uid and gid
+for its contents. The tarball will contain your uid and gid. If you are
+building the actual release for the PyPy website, you may want to be
+using another platform..."""
                 e = os.system('tar --numeric-owner -cvjf ' + archive + " " + name)
             elif sys.platform == 'cygwin':
                 e = os.system('tar --owner=Administrator --group=Administrators --numeric-owner -cvjf ' + archive + " " + name)

pypy/tool/release/test/test_package.py

             assert exe.mode == 0755
             assert exe.uname == ''
             assert exe.gname == ''
-            assert exe.uid == 0
-            assert exe.gid == 0
+            # The tar program on MacOSX or the FreeBSDs does not support
+            # setting the numeric uid and gid when creating a tar file.
+            if not(sys.platform == 'darwin' or sys.platform.startswith('freebsd')):
+                assert exe.uid == 0
+                assert exe.gid == 0
 
         # the headers file could be not there, because they are copied into
         # trunk/include only during translation