Description: Fix permission tests on Debian GNU/kFreeBSD
Author: Jelmer Vernooij <jelmer@samba.org>
Origin: upstream, commit:5690

=== modified file 'bzrlib/tests/per_branch/test_permissions.py'
--- old/bzrlib/tests/per_branch/test_permissions.py	2010-06-20 11:18:38 +0000
+++ new/bzrlib/tests/per_branch/test_permissions.py	2011-02-25 15:24:22 +0000
@@ -90,10 +90,10 @@
                                           ' permission logic')
         if sys.platform == 'win32':
             raise tests.TestNotApplicable('chmod has no effect on win32')
-        elif sys.platform == 'darwin' or sys.platform.startswith('freebsd'):
-            # OS X (and FreeBSD) create temp dirs with the 'wheel' group, which
-            # users are not likely to be in, and this prevents us from setting
-            # the sgid bit
+        elif sys.platform == 'darwin' or 'freebsd' in sys.platform:
+            # FreeBSD-based platforms create temp dirs with the 'wheel' group,
+            # which users are not likely to be in, and this prevents us
+            # from setting the sgid bit
             os.chown(self.test_dir, os.getuid(), os.getgid())
         # also, these are BzrBranch format specific things..
         t = self.make_branch_and_tree('.')

=== modified file 'bzrlib/tests/test_permissions.py'
--- old/bzrlib/tests/test_permissions.py	2011-01-27 14:27:18 +0000
+++ new/bzrlib/tests/test_permissions.py	2011-02-25 15:24:22 +0000
@@ -138,10 +138,10 @@
     def test_new_files_group_sticky_bit(self):
         if sys.platform == 'win32':
             raise TestSkipped('chmod has no effect on win32')
-        elif sys.platform == 'darwin' or sys.platform.startswith('freebsd'):
-            # OS X (and FreeBSD) create temp dirs with the 'wheel' group, which
-            # users are not likely to be in, and this prevents us from setting
-            # the sgid bit
+        elif sys.platform == 'darwin' or 'freebsd' in sys.platform:
+            # FreeBSD-based platforms create temp dirs with the 'wheel' group,
+            # which users are not likely to be in, and this prevents us from
+            # setting the sgid bit
             os.chown(self.test_dir, os.getuid(), os.getgid())
 
         t = self.make_branch_and_tree('.')

