Unverified Commit 19e28509 authored by K900's avatar K900 Committed by GitHub
Browse files

kdePackages: Plasma 6.4.3 (#425392)

parents c1bdb17d e23f2526
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
#!nix-shell -i python3 -p "python3.withPackages(ps: [ ps.beautifulsoup4 ps.click ps.httpx ps.jinja2 ps.packaging ps.pyyaml ])" nix-update
import base64
import binascii
import hashlib
import json
import pathlib
import subprocess
@@ -112,8 +113,17 @@ def main(pkgset: str, version: str, nixpkgs: pathlib.Path, sources_url: str | No

        url = urljoin(sources_url, link.attrs["href"])

        hash = client.get(url + ".sha256").text.split(" ", maxsplit=1)[0]
        assert hash
        hash = client.get(url + ".sha256").text.strip()

        if hash == "Hash type not supported":
            print(f"{url} missing hash on CDN, downloading...")
            hasher = hashlib.sha256()
            with client.stream("GET", url, follow_redirects=True) as r:
                for data in r.iter_bytes():
                    hasher.update(data)
            hash = hasher.hexdigest()
        else:
            hash = hash.split(" ", maxsplit=1)[0]

        if existing := results.get(project_name):
            old_version = existing["version"]
+207 −207

File changed.

Preview size limit exceeded, changes collapsed.