mpp: use simple urls if possible
If no `secrets` is required to download a package we can use the
simple checksum: url mapping, instead of the checksum: {url: }
one.
This commit is contained in:
parent
1b4f96c4e7
commit
2230dfe566
1 changed files with 10 additions and 4 deletions
14
tools/mpp.py
14
tools/mpp.py
|
|
@ -285,11 +285,17 @@ class ManifestFile:
|
|||
checksums = []
|
||||
|
||||
for dep in deps:
|
||||
checksum = dep["checksum"]
|
||||
checksum, url = dep["checksum"], dep["url"]
|
||||
|
||||
secretes = dep.get("secrets")
|
||||
if secretes:
|
||||
data = {
|
||||
"url": url,
|
||||
"secrets": secretes
|
||||
}
|
||||
else:
|
||||
data = url
|
||||
|
||||
data = {"url": dep["url"]}
|
||||
if "secrets" in dep:
|
||||
data["secrets"] = dep["secrets"]
|
||||
self.source_urls[checksum] = data
|
||||
checksums.append(checksum)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue