commit: 8bda7308b3f481ea05f0b0c671dfec4024384dfa Author: Sheng Yu <syu.os <AT> protonmail <DOT> com> AuthorDate: Sat Feb 11 03:10:23 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Feb 17 01:23:14 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8bda7308
Add warning if missing PATH in binpkg index Outdated portage does not have this metadata by default. Bug: https://bugs.gentoo.org/884869 Signed-off-by: Sheng Yu <syu.os <AT> protonmail.com> Signed-off-by: Sam James <sam <AT> gentoo.org> lib/_emerge/BinpkgFetcher.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/_emerge/BinpkgFetcher.py b/lib/_emerge/BinpkgFetcher.py index df99486a0..a18bed759 100644 --- a/lib/_emerge/BinpkgFetcher.py +++ b/lib/_emerge/BinpkgFetcher.py @@ -28,6 +28,10 @@ class BinpkgFetcher(CompositeTask): instance_key = bintree.dbapi._instance_key(pkg.cpv) binpkg_path = bintree._remotepkgs[instance_key].get("PATH") + if not binpkg_path: + raise FileNotFound( + f"PATH not found in the binpkg index, the binhost's portage is probably out of date." + ) binpkg_format = get_binpkg_format(binpkg_path) self.pkg_allocated_path = pkg.root_config.trees["bintree"].getname(
