pmb.helpers.repo.apkindex_files: deduplicate pmos urls (MR 1912)

Don't generate the postmarketOS mirror URLs here, let the urls()
function do it. A follow-up commit will touch this code, hence it's
important to have it de-duplicated.
This commit is contained in:
Oliver Smith 2020-04-12 23:23:35 +02:00
parent 6d64586b9f
commit 2fb98adf92
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -74,15 +74,8 @@ def apkindex_files(args, arch=None):
# Local user repository (for packages compiled with pmbootstrap)
ret = [args.work + "/packages/" + arch + "/APKINDEX.tar.gz"]
# Upstream postmarketOS binary repository
urls_todo = []
for mirror in args.mirrors_postmarketos:
if mirror:
urls_todo.append(mirror)
# Resolve the APKINDEX.$HASH.tar.gz files
urls_todo += urls(args, False, False)
for url in urls_todo:
for url in urls(args, False):
ret.append(args.work + "/cache_apk_" + arch + "/APKINDEX." +
hash(url) + ".tar.gz")