aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS7
-rw-r--r--lib/portage/dbapi/bintree.py4
-rw-r--r--lib/portage/tests/dbapi/test_bintree.py1
3 files changed, 12 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index a59af3818..d770e0b7e 100644
--- a/NEWS
+++ b/NEWS
@@ -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",