diff options
author | Sheng Yu <syu.os@protonmail.com> | 2022-08-19 16:24:59 -0400 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-09-09 12:15:57 +0200 |
commit | 52411290c67535d94c7b20fa996ae7108014adfb (patch) | |
tree | 992ab52a8e10d66a776d7a855a5e2c6d00f1445f | |
parent | setup.py: update for 3.0.35 (diff) | |
download | portage-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.py | 6 |
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: |