From 7bc9c63c9da678a7e6fceb095d56c634afd22c56 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 15 Dec 2019 18:09:03 +0000 Subject: gentoo resync : 15.12.2019 --- dev-python/python-debian/Manifest | 5 +- .../files/0.1.36-disable-apt-pkg.patch | 140 +++++++++++++++++++++ dev-python/python-debian/metadata.xml | 16 +-- .../python-debian/python-debian-0.1.36.ebuild | 40 ++++++ 4 files changed, 192 insertions(+), 9 deletions(-) create mode 100644 dev-python/python-debian/files/0.1.36-disable-apt-pkg.patch create mode 100644 dev-python/python-debian/python-debian-0.1.36.ebuild (limited to 'dev-python/python-debian') diff --git a/dev-python/python-debian/Manifest b/dev-python/python-debian/Manifest index da8ab487955d..7ceff5a4fb32 100644 --- a/dev-python/python-debian/Manifest +++ b/dev-python/python-debian/Manifest @@ -1,7 +1,10 @@ +AUX 0.1.36-disable-apt-pkg.patch 6718 BLAKE2B bd4cff4d6beb2ac85c2bc9c3b223774e9579a5d4d13ea5ce0eed55d9049a13a47dae712ee7d6165d7ab562321741bf4cc7476512ca7cc38ee23772e4855f69e8 SHA512 7937c8f21fb1e352c707cc87f6de4f6d9393ccd551007dc892ff6e2824c22bd48a66fc3c7ef718992d545b5b15f146b460ec09ba41e16f4a5db3827f30068e5f DIST python-debian_0.1.28.tar.xz 292404 BLAKE2B 78634043fc0dabd378bae171a485931b080dc0d31cc7e2ea448c000a1c4250e322f900cf0a0a4c3a8505af6f10da692d0fad948bc253ede7a38e4fe98831924b SHA512 ffbc924fe2dfd5790d49aacf80109bbaa18126bb8d6c9b8ffa25e9ed8b1cdeb28024a8dc202587682088e2e558da1642385faa4afda925cbb2edf6f304592a0d DIST python-debian_0.1.31.tar.xz 295720 BLAKE2B 3b3a68ab5604571355a15afac181e488c278ca78ab4c8a6cba4c392a0a89fd778bfd37e69a369d50fbc72f5080cf37fdbd31771f5d973c386795c436112ea347 SHA512 d2bf071b088e53ac132f91e5983c092bddb9736b3fd1394dfd2654fb8b6af7f89982af8debba8c4af21086d4f8a3ef86393fdef25ef18bcf71dcb00a60a8ae5b DIST python-debian_0.1.32.tar.xz 296028 BLAKE2B 15e2678a1ec2f4d96baec8b9e3ce7b84d8ad37f520fe9f174d6fe9cac8adbcbb73f628d9c3cdf39eca2639855e797b8f8cef4c9517063d61aa1e3b3ce7f1df2c SHA512 2b55d9a3100028699ec63dd4861a4f60d44e03662cc144784a37cdd980f3ff276e6cd2e535a50cdc6db28bf44affdd576259d73e14e16a2bbeeeda0de0bdd194 +DIST python-debian_0.1.36.tar.xz 308364 BLAKE2B 1cc7e2844db8143a3a4cc4f59c4bbb90bb90ab024b2524335d8ab69947ffe8c64b2b41a54a5d199cd287a3d6b6a0173c75be708af9aedfeb871e354ac1873528 SHA512 3f2ca6d86f6b6d383a1628021a77d19b562b0c409d204dba4de6968d2cdd2c8fb4aa882429fa1ce6af5361352f7a51b339c481dd47937cb103a08132379d77c5 EBUILD python-debian-0.1.28.ebuild 977 BLAKE2B fb35ea3ec33cc976c44d12f55c7a1dd8cef4c1a6b9941ee17780540f0833f4ddf15508419e651a64bcee1808f2de328a020b44151e4f8ddd817e2785808c3aa2 SHA512 00624b88e312930b8c152f09870ca1a43b90a35bb41b693926e1b7ef99578ab0a59872497877ab94dd180b7d49c435b7178863a2b83e407303edae41e2bb0032 EBUILD python-debian-0.1.31.ebuild 1007 BLAKE2B fcb38efe2f9f98edd7fda796239d6a282b5bc5fbcc2c303a295547b32b84cb0f874c8b82553546a9cb37aa5b2d4ac595c30c65e95f45bb63b80d8b1523837358 SHA512 b824462197c0a8459d9a1e2ad520767f5f197872894c455123f6973317c586886fbcf367b5e1a8dce2026213365c4117fe7474ef5880526abe6f536cce23e0ea EBUILD python-debian-0.1.32.ebuild 1012 BLAKE2B 3d21e119cdcfa2f2037bd7c6b19a8e5bc8d22a67e005e74992375de7941a1e0392504dbf68dff953bbe67ae27d1c3acb02af5a4f4135eaed2544f123b36d5fb2 SHA512 5694d17336090fe21b7768b9d99f2259f9680f64cee3d0dfc5921ee29f988c41c8ac870a94d0595646e0e127983bb29b083ae03997f4ea895a6404791e569aca -MISC metadata.xml 357 BLAKE2B 0b0bdfba85c4141c9931d4a363d204fabd9dd2e22b4d7a4af11bd97837fe6ab0cf0161fc154f396198b12d0084af54702a4f0ae0ef0b64f4d8c9efdd131f448a SHA512 452510eeb22c1db33118dfcd518488f42be0789b5607c9b76d316b14c6d1a474b6bfeddfc4034389a136c408bc4180ad704b6e1b0eac1381f9a77284b7016e39 +EBUILD python-debian-0.1.36.ebuild 970 BLAKE2B 1f7b5f7dbaf765791b03efbcd1086c1fc70d3eda2a1d15214d955e00081f5dfa6b1a94aac3879d0332fd2d05b6ce98982768bf61264ae106a86cdb0e9cee42ec SHA512 9072141ad503cf4af2c301de19091e84b8d973a17fe86b730924540797bf7da4a77ce5357a25b7155332585fff87e08d675a66e31d88bd02b18fd04f5c143ec6 +MISC metadata.xml 347 BLAKE2B ec810ad047c9d21228d5a0df18b78d6935168d4e474007c9aa057bc09bef0507cab59a1d087c72c880c98a055c36c4aea3d8ecadb1f6f746a0838d5630a61b00 SHA512 acad36081dda09984a3eee3348ea00e74a61c0d330ab5a9b14f1705fd1a5af82976d57e86a027d7c7c15bf9bda44dfce21eedc4c56f6337832769f8ed8cd1462 diff --git a/dev-python/python-debian/files/0.1.36-disable-apt-pkg.patch b/dev-python/python-debian/files/0.1.36-disable-apt-pkg.patch new file mode 100644 index 000000000000..b497986b6dab --- /dev/null +++ b/dev-python/python-debian/files/0.1.36-disable-apt-pkg.patch @@ -0,0 +1,140 @@ +From 76b7c4e7d16e8f792323f8d14ebdb1678d9d12b0 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Sat, 30 Nov 2019 23:18:05 -0500 +Subject: [PATCH] Disable apt_pkg support + +--- + lib/debian/deb822.py | 4 +-- + lib/debian/tests/test_deb822.py | 53 --------------------------------- + 2 files changed, 2 insertions(+), 55 deletions(-) + +diff --git a/lib/debian/deb822.py b/lib/debian/deb822.py +index c679f4b..2e85956 100644 +--- a/lib/debian/deb822.py ++++ b/lib/debian/deb822.py +@@ -1913,7 +1913,7 @@ class Sources(Dsc, _PkgRelationMixin): + def iter_paragraphs(cls, + sequence, # type: IterableInputDataType + fields=None, # type: Optional[List[str]] +- use_apt_pkg=True, # type: bool ++ use_apt_pkg=False, # type: bool + shared_storage=False, # type: bool + encoding="utf-8", # type: str + strict=None, # type: Optional[Dict] +@@ -1955,7 +1955,7 @@ class Packages(Deb822, _PkgRelationMixin, _VersionAccessorMixin): + def iter_paragraphs(cls, + sequence, # type: IterableInputDataType + fields=None, # type: Optional[List[str]] +- use_apt_pkg=True, # type: bool ++ use_apt_pkg=False, # type: bool + shared_storage=False, # type: bool + encoding="utf-8", # type: str + strict=None, # type: Optional[Dict] +diff --git a/lib/debian/tests/test_deb822.py b/lib/debian/tests/test_deb822.py +index 7101727..64a724c 100755 +--- a/lib/debian/tests/test_deb822.py ++++ b/lib/debian/tests/test_deb822.py +@@ -40,8 +40,6 @@ else: + from StringIO import StringIO + BytesIO = StringIO + +-import apt_pkg #type: ignore +- + from debian import deb822 + from debian.debian_support import Version + +@@ -465,11 +463,6 @@ class TestDeb822(unittest.TestCase): + for d in deb822.Deb822.iter_paragraphs(text, use_apt_pkg=False): + self.assertWellParsed(d, PARSED_PACKAGE) + +- with self.assertWarns(UserWarning): +- # The StringIO is not a real file so this will raise a warning +- for d in deb822.Deb822.iter_paragraphs(text, use_apt_pkg=True): +- self.assertWellParsed(d, PARSED_PACKAGE) +- + def test_iter_paragraphs_file(self): + text = StringIO() + text.write(UNPARSED_PACKAGE) +@@ -487,10 +480,6 @@ class TestDeb822(unittest.TestCase): + for d in deb822.Deb822.iter_paragraphs(fh, use_apt_pkg=False): + self.assertWellParsed(d, PARSED_PACKAGE) + +- fh.seek(0) +- for d in deb822.Deb822.iter_paragraphs(fh, use_apt_pkg=True): +- self.assertWellParsed(d, PARSED_PACKAGE) +- + + def test_iter_paragraphs_with_gpg(self): + for string in GPG_SIGNED: +@@ -556,12 +545,7 @@ class TestDeb822(unittest.TestCase): + test_count(deb822.Deb822.iter_paragraphs, 2) + test_count(deb822.Deb822.iter_paragraphs, 2, use_apt_pkg=False) + +- # apt_pkg used, should not split +- test_count(deb822.Deb822.iter_paragraphs, 1, use_apt_pkg=True) +- + # Specialised iter_paragraphs force use of apt_pkg and don't split +- test_count(deb822.Packages.iter_paragraphs, 1, use_apt_pkg=True) +- test_count(deb822.Sources.iter_paragraphs, 1, use_apt_pkg=True) + test_count(deb822.Packages.iter_paragraphs, 1, use_apt_pkg=False) + test_count(deb822.Sources.iter_paragraphs, 1, use_apt_pkg=False) + +@@ -607,27 +591,11 @@ class TestDeb822(unittest.TestCase): + s.write(b"\n") + self.assertEqual(s.getvalue(), packages_content) + +- def test_iter_paragraphs_apt_shared_storage_packages(self): +- self._test_iter_paragraphs(find_test_file("test_Packages"), +- deb822.Packages, +- use_apt_pkg=True, shared_storage=True) +- def test_iter_paragraphs_apt_no_shared_storage_packages(self): +- self._test_iter_paragraphs(find_test_file("test_Packages"), +- deb822.Packages, +- use_apt_pkg=True, shared_storage=False) + def test_iter_paragraphs_no_apt_no_shared_storage_packages(self): + self._test_iter_paragraphs(find_test_file("test_Packages"), + deb822.Packages, + use_apt_pkg=False, shared_storage=False) + +- def test_iter_paragraphs_apt_shared_storage_sources(self): +- self._test_iter_paragraphs(find_test_file("test_Sources"), +- deb822.Sources, +- use_apt_pkg=True, shared_storage=True) +- def test_iter_paragraphs_apt_no_shared_storage_sources(self): +- self._test_iter_paragraphs(find_test_file("test_Sources"), +- deb822.Sources, +- use_apt_pkg=True, shared_storage=False) + def test_iter_paragraphs_no_apt_no_shared_storage_sources(self): + self._test_iter_paragraphs(find_test_file("test_Sources"), + deb822.Sources, +@@ -973,27 +941,6 @@ Description: python modules to work with Debian-related data formats + self.assertWellParsed(paragraphs[i], + PARSED_PARAGRAPHS_WITH_COMMENTS[i]) + +- def test_iter_paragraphs_comments_use_apt_pkg(self): +- """ apt_pkg does not support comments within multiline fields +- +- This test checks that a file with comments inside multiline fields +- generates an error from the apt_pkg parser. +- +- See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750247#35 +- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807351 +- """ +- try: +- fd, filename = tempfile.mkstemp() +- fp = os.fdopen(fd, 'wb') +- fp.write(UNPARSED_PARAGRAPHS_WITH_COMMENTS.encode('utf-8')) +- fp.close() +- +- with open_utf8(filename) as fh: +- with self.assertRaises(apt_pkg.Error): +- list(deb822.Deb822.iter_paragraphs(fh, use_apt_pkg=True)) +- finally: +- os.remove(filename) +- + def test_iter_paragraphs_comments_native(self): + paragraphs = list(deb822.Deb822.iter_paragraphs( + UNPARSED_PARAGRAPHS_WITH_COMMENTS.splitlines(), use_apt_pkg=False)) +-- +2.24.0 + diff --git a/dev-python/python-debian/metadata.xml b/dev-python/python-debian/metadata.xml index b45b94729bb6..37d58853f5c7 100644 --- a/dev-python/python-debian/metadata.xml +++ b/dev-python/python-debian/metadata.xml @@ -1,12 +1,12 @@ - - floppym@gentoo.org - Mike Gilbert - - - python@gentoo.org - Python - + + floppym@gentoo.org + Mike Gilbert + + + python@gentoo.org + Python + diff --git a/dev-python/python-debian/python-debian-0.1.36.ebuild b/dev-python/python-debian/python-debian-0.1.36.ebuild new file mode 100644 index 000000000000..eb6ee829a2ec --- /dev/null +++ b/dev-python/python-debian/python-debian-0.1.36.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy ) + +inherit distutils-r1 + +DESCRIPTION="Python modules to work with Debian-related data formats" +HOMEPAGE="https://packages.debian.org/sid/python-debian" +SRC_URI="mirror://debian/pool/main/${P:0:1}/${PN}/${PN}_${PV}.tar.xz" + +LICENSE="GPL-2 GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-python/chardet[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] +" + +BDEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + app-arch/dpkg + $(python_gen_cond_dep 'dev-python/unittest2[${PYTHON_USEDEP}]' -2) + ) +" + +PATCHES=( "${FILESDIR}/0.1.36-disable-apt-pkg.patch" ) + +python_compile_all() { + ${EPYTHON} lib/debian/doc-debtags > README.debtags || die +} + +python_test() { + ${EPYTHON} -m unittest discover --verbose lib || die "Testing failed with ${EPYTHON}" +} -- cgit v1.2.3