commit:     295f94bed864d6f54d4abb81f28b40155a614e70
Author:     Sam Jorna <wraeth <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  5 09:40:38 2021 +0000
Commit:     Sam Jorna <wraeth <AT> gentoo <DOT> org>
CommitDate: Mon Jul  5 09:41:13 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=295f94be

net-irc/limnoria: add RSS, fix version, fix tests

Fixes the version reported by the bot - previously would only report as
'installed on timestamp', now reports actual version.

Stop removing the RSS plugin as the conflict caused by its presence no
longer appears to exist.  Also add upstream patch to fix broken test in
RSS tests (GH#1479).

Re-enable the Aka tests as issue resolved in GH#1392.

Bug: https://github.com/ProgVal/Limnoria/issues/1392
Bug: https://github.com/ProgVal/Limnoria/issues/1479
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Sam Jorna <wraeth <AT> gentoo.org>

 ...ria-20210617-rss-testRemoveAliasedFeed-mock_data.patch | 12 ++++++++++++
 ...mnoria-20210617.ebuild => limnoria-20210617-r1.ebuild} | 15 +++++++++------
 2 files changed, 21 insertions(+), 6 deletions(-)

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
new file mode 100644
index 00000000000..f3a57911284
--- /dev/null
+++ 
b/net-irc/limnoria/files/limnoria-20210617-rss-testRemoveAliasedFeed-mock_data.patch
@@ -0,0 +1,12 @@
+diff --git a/plugins/RSS/test.py b/plugins/RSS/test.py
+index eab10c61b..a9e3c07c6 100644
+--- a/plugins/RSS/test.py
++++ b/plugins/RSS/test.py
+@@ -102,6 +102,7 @@ def testCantAddDuplicatedFeed(self):
+ 
+     @mock_urllib
+     def testRemoveAliasedFeed(self, mock):
++        mock._data = xkcd_new
+         try:
+             self.assertNotError('rss announce add http://xkcd.com/rss.xml')
+             self.assertNotError('rss add xkcd http://xkcd.com/rss.xml')

diff --git a/net-irc/limnoria/limnoria-20210617.ebuild 
b/net-irc/limnoria/limnoria-20210617-r1.ebuild
similarity index 87%
rename from net-irc/limnoria/limnoria-20210617.ebuild
rename to net-irc/limnoria/limnoria-20210617-r1.ebuild
index 03b9171f694..cdecec64aaa 100644
--- a/net-irc/limnoria/limnoria-20210617.ebuild
+++ b/net-irc/limnoria/limnoria-20210617-r1.ebuild
@@ -5,6 +5,7 @@ EAPI=7
 
 PYTHON_COMPAT=( python3_{7..9} )
 DISTUTILS_USE_SETUPTOOLS=no
+DISTUTILS_IN_SOURCE_BUILD=yes # needed for tests
 inherit distutils-r1
 
 MY_PV="${PV:0:4}-${PV:4:2}-${PV:6:2}"
@@ -43,10 +44,14 @@ RDEPEND="
        !net-irc/supybot-plugins"
 BDEPEND="test? ( dev-python/mock[${PYTHON_USEDEP}] )"
 
-python_prepare() {
-       einfo "Removing the RSS plugin because of clashes between libxml2's 
Python3"
-       einfo "bindings and feedparser."
-       rm -r "plugins/RSS" || die
+PATCHES=(
+       "${FILESDIR}/${P}-rss-testRemoveAliasedFeed-mock_data.patch" # GH#1479
+)
+
+python_prepare_all() {
+       # replace "installed on ${timestamp}" with real version
+       echo "version='${MY_PV}'" > "${S}"/src/version.py || die
+       distutils-r1_python_prepare_all
 }
 
 python_test() {
@@ -56,8 +61,6 @@ python_test() {
        # intermittent failure due to issues loading libsandbox.so from 
LD_PRELOAD
        # runs successfully when running the tests on the installed system
        EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Unix" )
-       # Runs despite --no-network (GH #1392)
-       EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Aka" )
        "${EPYTHON}" "${BUILD_DIR}"/scripts/supybot-test "${BUILD_DIR}/../test" 
\
                --plugins-dir="${PLUGINS_DIR}" --no-network \
                --disable-multiprocessing "${EXCLUDE_PLUGINS[@]}" \

Reply via email to