diff options
author | Marien Zwart <marienz@gentoo.org> | 2012-04-13 15:38:48 +0000 |
---|---|---|
committer | Marien Zwart <marienz@gentoo.org> | 2012-04-13 15:38:48 +0000 |
commit | a068a01b7997bb675e4ec12986b0bb6d8c4656fe (patch) | |
tree | 2f7324b46ce6bf9eafab2c8777c94003f635faea /dev-python/twisted | |
parent | Version bump by Opportunist (bug #411819). (diff) | |
download | gentoo-2-a068a01b7997bb675e4ec12986b0bb6d8c4656fe.tar.gz gentoo-2-a068a01b7997bb675e4ec12986b0bb6d8c4656fe.tar.bz2 gentoo-2-a068a01b7997bb675e4ec12986b0bb6d8c4656fe.zip |
Fix a test that fails in some timezones (bug #409329).
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/twisted')
-rw-r--r-- | dev-python/twisted/ChangeLog | 6 | ||||
-rw-r--r-- | dev-python/twisted/files/twisted-12.0.0-fix-test-timeFormatting.patch | 26 | ||||
-rw-r--r-- | dev-python/twisted/twisted-12.0.0.ebuild | 5 |
3 files changed, 35 insertions, 2 deletions
diff --git a/dev-python/twisted/ChangeLog b/dev-python/twisted/ChangeLog index 2cfe23c50adf..2e747f57fcde 100644 --- a/dev-python/twisted/ChangeLog +++ b/dev-python/twisted/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-python/twisted # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted/ChangeLog,v 1.153 2012/03/22 07:03:15 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted/ChangeLog,v 1.154 2012/04/13 15:38:48 marienz Exp $ + + 13 Apr 2012; Marien Zwart <marienz@gentoo.org> + +files/twisted-12.0.0-fix-test-timeFormatting.patch, twisted-12.0.0.ebuild: + Fix a test that fails in some timezones (bug #409329). *twisted-12.0.0 (22 Mar 2012) diff --git a/dev-python/twisted/files/twisted-12.0.0-fix-test-timeFormatting.patch b/dev-python/twisted/files/twisted-12.0.0-fix-test-timeFormatting.patch new file mode 100644 index 000000000000..a466a973f959 --- /dev/null +++ b/dev-python/twisted/files/twisted-12.0.0-fix-test-timeFormatting.patch @@ -0,0 +1,26 @@ +Apply patch: use calendar.timegm instead of manual broken timezone math. + +Author: marienz +Review: itamar +Fixes: #5583 + +Index: /trunk/twisted/test/test_log.py +=================================================================== +--- /trunk/twisted/test/test_log.py (revision 32453) ++++ /trunk/twisted/test/test_log.py (revision 34145) +@@ -6,5 +6,5 @@ + """ + +-import os, sys, time, logging, warnings ++import os, sys, time, logging, warnings, calendar + from cStringIO import StringIO + +@@ -392,7 +392,5 @@ + human-readable string. + """ +- # There is no function in the time module which converts a UTC time +- # tuple to a timestamp. +- when = time.mktime((2001, 2, 3, 4, 5, 6, 7, 8, 0)) - time.timezone ++ when = calendar.timegm((2001, 2, 3, 4, 5, 6, 7, 8, 0)) + + # Pretend to be in US/Eastern for a moment diff --git a/dev-python/twisted/twisted-12.0.0.ebuild b/dev-python/twisted/twisted-12.0.0.ebuild index 2c0e323aa927..60c99a38c6aa 100644 --- a/dev-python/twisted/twisted-12.0.0.ebuild +++ b/dev-python/twisted/twisted-12.0.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted/twisted-12.0.0.ebuild,v 1.1 2012/03/22 07:03:15 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted/twisted-12.0.0.ebuild,v 1.2 2012/04/13 15:38:48 marienz Exp $ EAPI="4" PYTHON_DEPEND="2" @@ -34,6 +34,9 @@ src_prepare(){ # Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable. epatch "${FILESDIR}/${PN}-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch" + # Fix a test that fails in some timezones. + epatch "${FILESDIR}/${P}-fix-test-timeFormatting.patch" + if [[ "${EUID}" -eq 0 ]]; then # Disable tests failing with root permissions. sed \ |