diff options
author | Sheng Yu <syu.os@protonmail.com> | 2023-02-10 02:55:26 -0500 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-02-17 01:23:14 +0000 |
commit | c00dbfb9d8e3c494173200436ec4c5bc2689707f (patch) | |
tree | 7ac99c094cac3744f2226bdcd58eae04fd2592f9 | |
parent | Catch all Exceptions in binpkg identify (diff) | |
download | portage-c00dbfb9d8e3c494173200436ec4c5bc2689707f.tar.gz portage-c00dbfb9d8e3c494173200436ec4c5bc2689707f.tar.bz2 portage-c00dbfb9d8e3c494173200436ec4c5bc2689707f.zip |
Ignore update GPG signed binpkg
User cannot update them without key.
Signed-off-by: Sheng Yu <syu.os@protonmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | lib/portage/dbapi/bintree.py | 8 | ||||
-rw-r--r-- | lib/portage/tests/update/test_move_ent.py | 5 |
2 files changed, 12 insertions, 1 deletions
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"', + ), }, ) |