forked from Mirror/pmbootstrap
Improve algorithm to pick package provider (!1775)
Pick the provider with the shortest name instead of always the first one
This commit is contained in:
parent
8b8a73e8dd
commit
c847dfde7c
2 changed files with 19 additions and 11 deletions
|
@ -89,11 +89,8 @@ def package_provider(args, pkgname, pkgnames_install, suffix="native"):
|
|||
" the '" + suffix + "' chroot already")
|
||||
return provider
|
||||
|
||||
# 5. Pick the first one
|
||||
provider_pkgname = list(providers.keys())[0]
|
||||
logging.debug(pkgname + " has multiple providers (" +
|
||||
", ".join(providers) + "), picked: " + provider_pkgname)
|
||||
return providers[provider_pkgname]
|
||||
# 5. Pick the provider
|
||||
return pmb.parse.apkindex.provider_shortest(providers, pkgname)
|
||||
|
||||
|
||||
def package_from_index(args, pkgname_depend, pkgnames_install, package_aport,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue