#1609 10.6 Snow Leopard - fix getgroups implementation

closed-fixed
Daniel Macks
5
2009-10-31
2009-10-19
Guru Evi
No

Apparently Apple has a slightly different way of doing getgroups which makes the Fink python 2.5 and 2.6 fail with error messages like this (example from rdiff-backup):

Traceback (most recent call last):
File "/sw/bin/rdiff-backup", line 20, in <module>
import rdiff_backup.Main
File "/sw/lib/python2.6/site-packages/rdiff_backup/Main.py", line 24, in <module>
from log import Log, LoggerError, ErrorLog
File "/sw/lib/python2.6/site-packages/rdiff_backup/log.py", line 22, in <module>
import time, sys, traceback, types, rpath
File "/sw/lib/python2.6/site-packages/rdiff_backup/rpath.py", line 39, in <module>
import Globals, Time, static, log, user_group, C
File "/sw/lib/python2.6/site-packages/rdiff_backup/Globals.py", line 53, in <module>
process_groups = [process_gid] + os.getgroups()
OSError: [Errno 22] Invalid argument

MacPorts has this fixed with a patch:

http://trac.macports.org/changeset/58151

Maybe Fink can import this patch as well for Mac OS X 10.6

Discussion

  • Daniel Macks
    Daniel Macks
    2009-10-22

    I was unable to apply their patch to our current python2.6 successfully. I got a "?" response from ed and there was no change made to the sources.

    However, when I tried their test-case (import os; os.getgroups(); according to http://trac.macports.org/ticket/21559\) fink's current python25-1:2.5.4-1 and python26-1:2.6.2-2 give sane results rather than error messages.

     
  • Daniel Macks
    Daniel Macks
    2009-10-22

    (Forgot to mention, my failed attempt to reproduce the bug was on 10.4/ppc)

     
  • Daniel Macks
    Daniel Macks
    2009-10-22

    converted .ed->.patch for sanity

     
    Attachments
  • Daniel Macks
    Daniel Macks
    2009-10-22

    Managed to apply it. However, monipol reports that the bug is apparently not present on 10.5 either I wonder if this is a 10.6-specific mess, and if this patch is safe for 10.[45] users (or else will require a separate python package for 10.6 users).

     
  • Guru Evi
    Guru Evi
    2009-10-28

    It is 10.6 specific. If the patch doesn't affect 10.5 or 10.4, then I would just use it.

     
  • Daniel Macks
    Daniel Macks
    2009-10-31

    Committed 10.6-specific python2[56] packages incorporating apple's patches. Thanks for tracking down the problem/solution!

     
  • Daniel Macks
    Daniel Macks
    2009-10-31

    • assigned_to: nobody --> dmacks
    • status: open --> closed-fixed