diff options
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | lib/portage/dbapi/bintree.py | 4 | ||||
-rw-r--r-- | lib/portage/tests/dbapi/test_bintree.py | 1 |
3 files changed, 12 insertions, 0 deletions
@@ -1,3 +1,10 @@ +portage-3.0.52 (UNRELEASED) +-------------- + +Features: +* bintree: Add new API member (invalid_paths) to allow gentoolkit to later + clean up invalid binpkgs (bug #900224). + portage-3.0.51 (2023-08-20) -------------- diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py index 5f58c548d..af2113bd8 100644 --- a/lib/portage/dbapi/bintree.py +++ b/lib/portage/dbapi/bintree.py @@ -485,6 +485,7 @@ class binarytree: self._remotepkgs = None # remote metadata indexed by cpv self._additional_pkgs = {} self.invalids = [] + self.invalid_paths: dict[str, list[str]] = {} self.settings = settings self._pkg_paths = {} self._populating = False @@ -1017,12 +1018,14 @@ class binarytree: noiselevel=-1, ) self.invalids.append(myfile[:-5]) + self.invalid_paths[myfile] = [full_path] continue try: binpkg_format = get_binpkg_format(myfile) except InvalidBinaryPackageFormat: self.invalids.append(myfile[:-5]) + self.invalid_paths[myfile[:-5]] = [full_path] continue if gpkg_only: @@ -1089,6 +1092,7 @@ class binarytree: for line in textwrap.wrap("".join(msg), 72): writemsg(f"!!! {line}\n", noiselevel=-1) self.invalids.append(mypkg) + self.invalid_paths[mypkg] = [full_path] continue multi_instance = False diff --git a/lib/portage/tests/dbapi/test_bintree.py b/lib/portage/tests/dbapi/test_bintree.py index 383d5585e..60785b4e5 100644 --- a/lib/portage/tests/dbapi/test_bintree.py +++ b/lib/portage/tests/dbapi/test_bintree.py @@ -46,6 +46,7 @@ class BinarytreeTestCase(TestCase): "_remotepkgs", "_additional_pkgs", "invalids", + "invalid_paths", "settings", "_pkg_paths", "_populating", |