aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSheng Yu <syu.os@protonmail.com>2022-08-19 16:24:59 -0400
committerMichał Górny <mgorny@gentoo.org>2022-09-09 12:15:57 +0200
commit52411290c67535d94c7b20fa996ae7108014adfb (patch)
tree992ab52a8e10d66a776d7a855a5e2c6d00f1445f
parentsetup.py: update for 3.0.35 (diff)
downloadportage-52411290.tar.gz
portage-52411290.tar.bz2
portage-52411290.zip
Detect binary package format if not in database
Signed-off-by: Sheng Yu <syu.os@protonmail.com> Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--lib/portage/dbapi/bintree.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py
index b441fff9a..0857ff21a 100644
--- a/lib/portage/dbapi/bintree.py
+++ b/lib/portage/dbapi/bintree.py
@@ -1039,6 +1039,12 @@ class binarytree:
if match:
binpkg_format = match.get("BINPKG_FORMAT", None)
+ if not binpkg_format:
+ if myfile.endswith(SUPPORTED_XPAK_EXTENSIONS):
+ binpkg_format = "xpak"
+ elif myfile.endswith(SUPPORTED_GPKG_EXTENSIONS):
+ binpkg_format = "gpkg"
+
if gpkg_only:
if binpkg_format != "gpkg":
if not gpkg_only_warned: