From c00dbfb9d8e3c494173200436ec4c5bc2689707f Mon Sep 17 00:00:00 2001 From: Sheng Yu Date: Fri, 10 Feb 2023 02:55:26 -0500 Subject: Ignore update GPG signed binpkg User cannot update them without key. Signed-off-by: Sheng Yu Signed-off-by: Sam James --- lib/portage/dbapi/bintree.py | 8 ++++++++ lib/portage/tests/update/test_move_ent.py | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py index 23bc41d44..5f58c548d 100644 --- a/lib/portage/dbapi/bintree.py +++ b/lib/portage/dbapi/bintree.py @@ -674,6 +674,14 @@ class binarytree: elif binpkg_format == "gpkg": mybinpkg = portage.gpkg.gpkg(self.settings, mycpv, binpkg_path) mydata = mybinpkg.get_metadata() + if mybinpkg.signature_exist: + writemsg( + colorize( + "WARN", + f"Binpkg update ignored for signed package: {binpkg_path}", + ) + ) + continue decode_metadata_name = True else: continue diff --git a/lib/portage/tests/update/test_move_ent.py b/lib/portage/tests/update/test_move_ent.py index 562d7b107..22d0c8feb 100644 --- a/lib/portage/tests/update/test_move_ent.py +++ b/lib/portage/tests/update/test_move_ent.py @@ -58,7 +58,10 @@ class MoveEntTestCase(TestCase): ebuilds=ebuilds, installed=installed, user_config={ - "make.conf": (f'BINPKG_FORMAT="{binpkg_format}"',), + "make.conf": ( + f'BINPKG_FORMAT="{binpkg_format}"', + 'FEATURES="-binpkg-signing"', + ), }, ) -- cgit v1.2.3-65-gdbad