Gentoo Archives: gentoo-commits

From: Sam Jorna <wraeth@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/limnoria/files/, net-irc/limnoria/
Date: Mon, 05 Jul 2021 09:41:45
Message-Id: 1625478073.295f94bed864d6f54d4abb81f28b40155a614e70.wraeth@gentoo
1 commit: 295f94bed864d6f54d4abb81f28b40155a614e70
2 Author: Sam Jorna <wraeth <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 5 09:40:38 2021 +0000
4 Commit: Sam Jorna <wraeth <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 5 09:41:13 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=295f94be
7
8 net-irc/limnoria: add RSS, fix version, fix tests
9
10 Fixes the version reported by the bot - previously would only report as
11 'installed on timestamp', now reports actual version.
12
13 Stop removing the RSS plugin as the conflict caused by its presence no
14 longer appears to exist. Also add upstream patch to fix broken test in
15 RSS tests (GH#1479).
16
17 Re-enable the Aka tests as issue resolved in GH#1392.
18
19 Bug: https://github.com/ProgVal/Limnoria/issues/1392
20 Bug: https://github.com/ProgVal/Limnoria/issues/1479
21 Package-Manager: Portage-3.0.20, Repoman-3.0.3
22 Signed-off-by: Sam Jorna <wraeth <AT> gentoo.org>
23
24 ...ria-20210617-rss-testRemoveAliasedFeed-mock_data.patch | 12 ++++++++++++
25 ...mnoria-20210617.ebuild => limnoria-20210617-r1.ebuild} | 15 +++++++++------
26 2 files changed, 21 insertions(+), 6 deletions(-)
27
28 diff --git a/net-irc/limnoria/files/limnoria-20210617-rss-testRemoveAliasedFeed-mock_data.patch b/net-irc/limnoria/files/limnoria-20210617-rss-testRemoveAliasedFeed-mock_data.patch
29 new file mode 100644
30 index 00000000000..f3a57911284
31 --- /dev/null
32 +++ b/net-irc/limnoria/files/limnoria-20210617-rss-testRemoveAliasedFeed-mock_data.patch
33 @@ -0,0 +1,12 @@
34 +diff --git a/plugins/RSS/test.py b/plugins/RSS/test.py
35 +index eab10c61b..a9e3c07c6 100644
36 +--- a/plugins/RSS/test.py
37 ++++ b/plugins/RSS/test.py
38 +@@ -102,6 +102,7 @@ def testCantAddDuplicatedFeed(self):
39 +
40 + @mock_urllib
41 + def testRemoveAliasedFeed(self, mock):
42 ++ mock._data = xkcd_new
43 + try:
44 + self.assertNotError('rss announce add http://xkcd.com/rss.xml')
45 + self.assertNotError('rss add xkcd http://xkcd.com/rss.xml')
46
47 diff --git a/net-irc/limnoria/limnoria-20210617.ebuild b/net-irc/limnoria/limnoria-20210617-r1.ebuild
48 similarity index 87%
49 rename from net-irc/limnoria/limnoria-20210617.ebuild
50 rename to net-irc/limnoria/limnoria-20210617-r1.ebuild
51 index 03b9171f694..cdecec64aaa 100644
52 --- a/net-irc/limnoria/limnoria-20210617.ebuild
53 +++ b/net-irc/limnoria/limnoria-20210617-r1.ebuild
54 @@ -5,6 +5,7 @@ EAPI=7
55
56 PYTHON_COMPAT=( python3_{7..9} )
57 DISTUTILS_USE_SETUPTOOLS=no
58 +DISTUTILS_IN_SOURCE_BUILD=yes # needed for tests
59 inherit distutils-r1
60
61 MY_PV="${PV:0:4}-${PV:4:2}-${PV:6:2}"
62 @@ -43,10 +44,14 @@ RDEPEND="
63 !net-irc/supybot-plugins"
64 BDEPEND="test? ( dev-python/mock[${PYTHON_USEDEP}] )"
65
66 -python_prepare() {
67 - einfo "Removing the RSS plugin because of clashes between libxml2's Python3"
68 - einfo "bindings and feedparser."
69 - rm -r "plugins/RSS" || die
70 +PATCHES=(
71 + "${FILESDIR}/${P}-rss-testRemoveAliasedFeed-mock_data.patch" # GH#1479
72 +)
73 +
74 +python_prepare_all() {
75 + # replace "installed on ${timestamp}" with real version
76 + echo "version='${MY_PV}'" > "${S}"/src/version.py || die
77 + distutils-r1_python_prepare_all
78 }
79
80 python_test() {
81 @@ -56,8 +61,6 @@ python_test() {
82 # intermittent failure due to issues loading libsandbox.so from LD_PRELOAD
83 # runs successfully when running the tests on the installed system
84 EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Unix" )
85 - # Runs despite --no-network (GH #1392)
86 - EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Aka" )
87 "${EPYTHON}" "${BUILD_DIR}"/scripts/supybot-test "${BUILD_DIR}/../test" \
88 --plugins-dir="${PLUGINS_DIR}" --no-network \
89 --disable-multiprocessing "${EXCLUDE_PLUGINS[@]}" \