diff options
author | 2023-03-25 18:24:51 +0100 | |
---|---|---|
committer | 2023-04-03 21:26:35 +0300 | |
commit | 7ca3a4bd98b64c1a62ad8e9f2b174fe73d6e9ce2 (patch) | |
tree | 9820d9b618f2b4eb958ab32e869027525c188a20 /testdata | |
parent | python: Include PYPI_PN opportunities in PythonInlinePyPIURI (diff) | |
download | pkgcheck-7ca3a4bd98b64c1a62ad8e9f2b174fe73d6e9ce2.tar.gz pkgcheck-7ca3a4bd98b64c1a62ad8e9f2b174fe73d6e9ce2.tar.bz2 pkgcheck-7ca3a4bd98b64c1a62ad8e9f2b174fe73d6e9ce2.zip |
python: Restore filename check in pypi.eclass default case
Restore the check for renamed distfile that was accidentally removed
while refactoring the code. This prevents suggesting removing SRC_URI
when it would cause the distfile rename to be reverted.
Fixes: 5704c77f5cabed06be363df78ca03b6e66566a97
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/pkgcore/pkgcheck/pull/572
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'testdata')
4 files changed, 38 insertions, 0 deletions
diff --git a/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/expected.json b/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/expected.json index 45757750..dfe74895 100644 --- a/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/expected.json +++ b/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/expected.json @@ -20,3 +20,4 @@ {"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "1000-r200", "url": "https://files.pythonhosted.org/packages/source/P/Python-inline-pypi-url/python_inline_pypi_url-1000.tar.gz", "replacement": null, "normalize": true, "append": false, "pypi_pn": "\"${PN^}\""} {"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "2000", "url": "https://files.pythonhosted.org/packages/source/p/python.inline-pypi-url/python_inline_pypi_url-2000.tar.gz", "replacement": ["pypi_sdist_url", "\"${PN/-/.}\""], "normalize": null, "append": null, "pypi_pn": null} {"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "2000", "url": "https://files.pythonhosted.org/packages/source/p/python.inline-pypi-url_vectors/python.inline-pypi-url_vectors-151.tar.gz", "replacement": ["pypi_sdist_url", "--no-normalize", "python.inline-pypi-url_vectors", "151"], "normalize": null, "append": null, "pypi_pn": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "2_p4-r2", "url": "https://files.pythonhosted.org/packages/source/P/PythonInlinePyPIURL/pythoninlinepypiurl-2.post4.tar.gz", "replacement": ["pypi_sdist_url", "\"${PN}\"", "2.post4"], "normalize": null, "append": null, "pypi_pn": null} diff --git a/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/fix.patch b/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/fix.patch index 28e27b9e..09bbcd62 100644 --- a/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/fix.patch +++ b/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/fix.patch @@ -341,3 +341,24 @@ diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-4 " S=${WORKDIR}/${MY_P} +diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4-r2.ebuild fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4-r2.ebuild +--- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4-r2.ebuild 2023-03-25 18:33:03.235669903 +0100 ++++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4-r2.ebuild 2023-03-25 18:37:09.307850231 +0100 +@@ -3,13 +3,14 @@ + + EAPI=8 + +-MY_P=${PN,,}-${PV/_p/.post} ++PYPI_PN=${PN,,} ++inherit pypi ++ + DESCRIPTION="Ebuild with PyPI URL" + HOMEPAGE="https://example.com" + SRC_URI=" +- mirror://pypi/${PN::1}/${PN}/${MY_P}.tar.gz -> python-${MY_P}.tar.gz ++ $(pypi_sdist_url) -> python-${MY_P}.tar.gz + " +-S=${WORKDIR}/${MY_P} + + LICENSE="BSD" + SLOT="0" diff --git a/testdata/repos/python/PythonFetchableCheck/PythonInlinePyPIURL/Manifest b/testdata/repos/python/PythonFetchableCheck/PythonInlinePyPIURL/Manifest index 39d6377a..7b6a198a 100644 --- a/testdata/repos/python/PythonFetchableCheck/PythonInlinePyPIURL/Manifest +++ b/testdata/repos/python/PythonFetchableCheck/PythonInlinePyPIURL/Manifest @@ -8,3 +8,4 @@ DIST pypi_url-3-py3-none-any.whl.zip 153310 BLAKE2B b7484cd9bebe912f9c8877c0f09d DIST pythoninlinepypiurl-4-cp310-cp310-linux_x86_64.whl 153310 BLAKE2B b7484cd9bebe912f9c8877c0f09df059130c2dc5c4da8c926f8df7945bcb7b255cdf810ce8cd16a987fb5bca3d1e71c088cd894968641db5dfae1c4c059df836 SHA512 86ff9e1c4b9353b1fbb475c7bb9d2a97bd9db8421ea5190b5a84832930b34cb5b79f8c3da68a5eb8db334f06851ec129cc6611a371e47b7c5de7a615feec5e05 DIST pypi_url-4.tar.gz 153310 BLAKE2B b7484cd9bebe912f9c8877c0f09df059130c2dc5c4da8c926f8df7945bcb7b255cdf810ce8cd16a987fb5bca3d1e71c088cd894968641db5dfae1c4c059df836 SHA512 86ff9e1c4b9353b1fbb475c7bb9d2a97bd9db8421ea5190b5a84832930b34cb5b79f8c3da68a5eb8db334f06851ec129cc6611a371e47b7c5de7a615feec5e05 DIST pythoninlinepypiurl-2.post4.tar.gz 153310 BLAKE2B b7484cd9bebe912f9c8877c0f09df059130c2dc5c4da8c926f8df7945bcb7b255cdf810ce8cd16a987fb5bca3d1e71c088cd894968641db5dfae1c4c059df836 SHA512 86ff9e1c4b9353b1fbb475c7bb9d2a97bd9db8421ea5190b5a84832930b34cb5b79f8c3da68a5eb8db334f06851ec129cc6611a371e47b7c5de7a615feec5e05 +DIST python-pythoninlinepypiurl-2.post4.tar.gz 153310 BLAKE2B b7484cd9bebe912f9c8877c0f09df059130c2dc5c4da8c926f8df7945bcb7b255cdf810ce8cd16a987fb5bca3d1e71c088cd894968641db5dfae1c4c059df836 SHA512 86ff9e1c4b9353b1fbb475c7bb9d2a97bd9db8421ea5190b5a84832930b34cb5b79f8c3da68a5eb8db334f06851ec129cc6611a371e47b7c5de7a615feec5e05 diff --git a/testdata/repos/python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4-r2.ebuild b/testdata/repos/python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4-r2.ebuild new file mode 100644 index 00000000..8565c774 --- /dev/null +++ b/testdata/repos/python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4-r2.ebuild @@ -0,0 +1,15 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_P=${PN,,}-${PV/_p/.post} +DESCRIPTION="Ebuild with PyPI URL" +HOMEPAGE="https://example.com" +SRC_URI=" + mirror://pypi/${PN::1}/${PN}/${MY_P}.tar.gz -> python-${MY_P}.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="BSD" +SLOT="0" |