1 |
commit: 52411290c67535d94c7b20fa996ae7108014adfb |
2 |
Author: Sheng Yu <syu.os <AT> protonmail <DOT> com> |
3 |
AuthorDate: Fri Aug 19 20:24:59 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 9 10:15:57 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=52411290 |
7 |
|
8 |
Detect binary package format if not in database |
9 |
|
10 |
Signed-off-by: Sheng Yu <syu.os <AT> protonmail.com> |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
lib/portage/dbapi/bintree.py | 6 ++++++ |
14 |
1 file changed, 6 insertions(+) |
15 |
|
16 |
diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py |
17 |
index b441fff9a..0857ff21a 100644 |
18 |
--- a/lib/portage/dbapi/bintree.py |
19 |
+++ b/lib/portage/dbapi/bintree.py |
20 |
@@ -1039,6 +1039,12 @@ class binarytree: |
21 |
if match: |
22 |
binpkg_format = match.get("BINPKG_FORMAT", None) |
23 |
|
24 |
+ if not binpkg_format: |
25 |
+ if myfile.endswith(SUPPORTED_XPAK_EXTENSIONS): |
26 |
+ binpkg_format = "xpak" |
27 |
+ elif myfile.endswith(SUPPORTED_GPKG_EXTENSIONS): |
28 |
+ binpkg_format = "gpkg" |
29 |
+ |
30 |
if gpkg_only: |
31 |
if binpkg_format != "gpkg": |
32 |
if not gpkg_only_warned: |