On Jun 9, 2015, at 12:43 AM, Jun Omae wrote:
> The following patch would fix the issue. I'll apply this to 1.0-stable later.
>
> diff --git a/trac/db/tests/sqlite_test.py b/trac/db/tests/sqlite_test.py
> index c1ccefd..d1fb3ea 100644
> --- a/trac/db/tests/sqlite_test.py
> +++ b/trac/db/tests/sqlite_test.py
> @@ -78,9 +78,12 @@ class DatabaseFileTestCase(unittest.TestCase):
> except ConfigurationError, e:
> self.assertIn('requires read _and_ write permissions', unicode(e))
>
> + if os.name == 'posix' and os.getuid() == 0:
> + del test_no_permissions # For root, os.access() always returns True
> +
> def test_error_with_lazy_translation(self):
> self._create_env()
> - os.chmod(self.db_path, 0444)
> + os.remove(self.db_path)
> env = Environment(self.env_path)
> chrome = Chrome(env)
> dispatcher = RequestDispatcher(env)
> @@ -94,7 +97,9 @@ class DatabaseFileTestCase(unittest.TestCase):
> self._db_query(env)
> self.fail('ConfigurationError not raised')
> except ConfigurationError, e:
> - self.assertIn('requires read _and_ write permissions',
> unicode(e))
> + message = unicode(e)
> + self.assertIn('Database "', message)
> + self.assertIn('" not found.', message)
> finally:
> translation.deactivate()
I hate to dredge-up a month-old thread, but I had the same problem.
I found a "trac-1.0.6-1.post2.1.sdl7.noarch.rpm" for something called
"PIUAS/Springdale Linux 7", a CentOS-like RHEL clone from Princeton.
Trying to rebuild their RPM on RHEL 7.1 from their SRPM (dated
"27-May-2015 09:08 3.5M"):
http://springdale.math.ias.edu/data/puias/unsupported/7.1/SRPMS/trac-1.0.6-1.post2.1.sdl7.src.rpm
I hit the same exact 'AssertionError: ConfigurationError not raised' errors
in .../trac/db/tests/sqlite_test.py that Ryan Skadberg did.
I first thought, if the fix is to alter .../trac/db/tests/sqlite_test.py
like Jun's patch does, then how were Springdale Linux able to get their RPM
to build, given that it has the same unpatched version of sqlite_test.py?
It turned out it works fine if I run "rpmbuild" as "mockbuild" rather than
as "root". So maybe Jun's patch isn't really necessary - just a
self.fail('Do not build me as root, turkey')
might be sufficient :-)
- Greg
--
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.