diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2022-11-11 19:33:06 +0200 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2022-11-11 19:33:42 +0200 |
commit | ad80bcbb0fb4b7ddca33a27f7f450fd6baa2cf54 (patch) | |
tree | 86b455429662faf5b76f1776a5f2cee8aa698624 /sys-apps/pkgcore | |
parent | sys-kernel/linux-firmware: add 20221109 (diff) | |
download | gentoo-ad80bcbb0fb4b7ddca33a27f7f450fd6baa2cf54.tar.gz gentoo-ad80bcbb0fb4b7ddca33a27f7f450fd6baa2cf54.tar.bz2 gentoo-ad80bcbb0fb4b7ddca33a27f7f450fd6baa2cf54.zip |
sys-apps/pkgcore: fix test artifacts being installed
Closes: https://bugs.gentoo.org/880881
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'sys-apps/pkgcore')
-rw-r--r-- | sys-apps/pkgcore/files/pkgcore-0.12.17-fix-extra-files.patch | 29 | ||||
-rw-r--r-- | sys-apps/pkgcore/pkgcore-0.12.17-r2.ebuild (renamed from sys-apps/pkgcore/pkgcore-0.12.17-r1.ebuild) | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/sys-apps/pkgcore/files/pkgcore-0.12.17-fix-extra-files.patch b/sys-apps/pkgcore/files/pkgcore-0.12.17-fix-extra-files.patch new file mode 100644 index 000000000000..bc6b16ffc69f --- /dev/null +++ b/sys-apps/pkgcore/files/pkgcore-0.12.17-fix-extra-files.patch @@ -0,0 +1,29 @@ +--- a/tests/ebuild/test_eapi.py ++++ b/tests/ebuild/test_eapi.py +@@ -1,6 +1,8 @@ ++import shutil + from unittest import mock + + import pytest ++from pkgcore.const import EBD_PATH + from pkgcore.ebuild import eapi + from pkgcore.ebuild.eapi import EAPI, eapi6, get_eapi + +@@ -19,13 +21,15 @@ def test_get_eapi(): + + class TestEAPI: + +- def test_register(self): ++ def test_register(self, tmp_path): + # re-register known EAPI + with pytest.raises(ValueError): + EAPI.register(magic="0") + ++ mock_ebd_temp = str(shutil.copytree(EBD_PATH, tmp_path / 'ebd')) + with mock.patch('pkgcore.ebuild.eapi.bash_version') as bash_version, \ +- mock.patch.dict(eapi.EAPI.known_eapis): ++ mock.patch.dict(eapi.EAPI.known_eapis), \ ++ mock.patch('pkgcore.ebuild.eapi.const.EBD_PATH', mock_ebd_temp): + # inadequate bash version + bash_version.return_value = '3.1' + with pytest.raises(SystemExit) as excinfo: diff --git a/sys-apps/pkgcore/pkgcore-0.12.17-r1.ebuild b/sys-apps/pkgcore/pkgcore-0.12.17-r2.ebuild index 9f732afa4d66..4c804c52bcce 100644 --- a/sys-apps/pkgcore/pkgcore-0.12.17-r1.ebuild +++ b/sys-apps/pkgcore/pkgcore-0.12.17-r2.ebuild @@ -40,6 +40,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}/${PN}-0.12.17-fix-prefix.patch" + "${FILESDIR}/${PN}-0.12.17-fix-extra-files.patch" ) distutils_enable_tests pytest |