summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Ochotnicky <sochotnicky@gentoo.org>2013-01-03 00:08:39 +0000
committerStanislav Ochotnicky <sochotnicky@gentoo.org>2013-01-03 00:08:39 +0000
commitbf1e72b894633fa254d85bbc0bc004a291dacadd (patch)
tree54ed8a0689d20effe8edf01d0ec27b55c743e5ee /media-sound
parentVersion bump. (diff)
downloadgentoo-2-bf1e72b894633fa254d85bbc0bc004a291dacadd.tar.gz
gentoo-2-bf1e72b894633fa254d85bbc0bc004a291dacadd.tar.bz2
gentoo-2-bf1e72b894633fa254d85bbc0bc004a291dacadd.zip
Properly fix tests failing during update (#422685)
We'd accidentally use beetsplug modules from previous version when doing updates due to beets using python namespaces (and portage not supporting them correctly). Thanks to Arfrever for help with finding the root cause and proposing a fix (Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 7B087241)
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/beets/ChangeLog10
-rw-r--r--media-sound/beets/beets-1.0_rc2.ebuild10
-rw-r--r--media-sound/beets/files/beets-1.0_rc2-test-namespace.patch17
3 files changed, 33 insertions, 4 deletions
diff --git a/media-sound/beets/ChangeLog b/media-sound/beets/ChangeLog
index ee3caee52c15..ef92b4cb7713 100644
--- a/media-sound/beets/ChangeLog
+++ b/media-sound/beets/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-sound/beets
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/beets/ChangeLog,v 1.9 2013/01/02 23:18:22 sochotnicky Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/beets/ChangeLog,v 1.10 2013/01/03 00:08:39 sochotnicky Exp $
+
+ 03 Jan 2013; Stanislav Ochotnicky <sochotnicky@gentoo.org>
+ +files/beets-1.0_rc2-test-namespace.patch, beets-1.0_rc2.ebuild:
+ Properly fix tests failing during update (#422685) We'd accidentally use
+ beetsplug modules from previous version when doing updates due to beets using
+ python namespaces (and portage not supporting them correctly). Thanks to
+ Arfrever for help with finding the root cause and proposing a fix
*beets-1.0_rc2 (02 Jan 2013)
@@ -46,4 +53,3 @@
28 May 2012; Stanislav Ochotnicky <sochotnicky@gentoo.org>
+beets-1.0_beta14.ebuild, +metadata.xml:
New ebuild for beets music organizer
-
diff --git a/media-sound/beets/beets-1.0_rc2.ebuild b/media-sound/beets/beets-1.0_rc2.ebuild
index 39466a1895b5..7c696b52c1ea 100644
--- a/media-sound/beets/beets-1.0_rc2.ebuild
+++ b/media-sound/beets/beets-1.0_rc2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/beets/beets-1.0_rc2.ebuild,v 1.1 2013/01/02 23:18:22 sochotnicky Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/beets/beets-1.0_rc2.ebuild,v 1.2 2013/01/03 00:08:39 sochotnicky Exp $
EAPI="4"
@@ -10,7 +10,7 @@ SUPPORT_PYTHON_ABIS="1"
#There a few test failures with 2.6, worth investigating
RESTRICT_PYTHON_ABIS="2.5 3.* 2.7-pypy-*"
-inherit distutils
+inherit distutils eutils
MY_PV=${PV/_rc/rc}
MY_P=${PN}-${MY_PV}
@@ -47,6 +47,11 @@ S=${WORKDIR}/${MY_P}
src_prepare() {
distutils_src_prepare
+ # we'll need this as long as portage doesn't have proper python
+ # namespace support (without this we would try to load modules from
+ # previous installation during updates)
+ use test && epatch "${FILESDIR}/${P}-test-namespace.patch"
+
# remove plugins that do not have appropriate dependencies installed
for flag in bpd chroma convert echonest_tempo lastgenre replaygain web;do
if ! use $flag ; then
@@ -63,6 +68,7 @@ src_prepare() {
done
use bpd || rm -f test/test_player.py
+
}
src_compile() {
diff --git a/media-sound/beets/files/beets-1.0_rc2-test-namespace.patch b/media-sound/beets/files/beets-1.0_rc2-test-namespace.patch
new file mode 100644
index 000000000000..38c341933d1a
--- /dev/null
+++ b/media-sound/beets/files/beets-1.0_rc2-test-namespace.patch
@@ -0,0 +1,17 @@
+diff --git a/test/testall.py b/test/testall.py
+index 3e12d78..6031fc3 100755
+--- a/test/testall.py
++++ b/test/testall.py
+@@ -24,6 +24,12 @@ pkgpath = os.path.dirname(__file__) or '.'
+ sys.path.append(pkgpath)
+ os.chdir(pkgpath)
+
++try:
++ del sys.modules["beetsplug"]
++except KeyError:
++ pass
++
++
+ def suite():
+ s = unittest.TestSuite()
+ # Get the suite() of every module in this directory beginning with