Commit 8009fe43 authored by Kristian Klausen's avatar Kristian Klausen 🎉
Browse files

Also download and import the package signature

Fix #2
parent be50232c
Pipeline #25171 passed with stage
in 31 seconds
......@@ -99,14 +99,15 @@ for repo in repos:
url = f"https://geo.mirror.pkgbuild.com/pool/packages/{filename}"
else:
url = f"https://geo.mirror.pkgbuild.com/pool/community/{filename}"
r = requests.get(url)
r.raise_for_status()
with open(f"{filename}", "wb") as file:
file.write(r.content)
for suffix in ["", ".sig"]:
r = requests.get(f"{url}{suffix}")
r.raise_for_status()
with open(f"{filename}{suffix}", "wb") as file:
file.write(r.content)
print(f"Downloaded {filename}")
filenames = [os.path.abspath(f"{filename}") for filename in filenames]
p = subprocess.run(
["poetry", "run", "repod-file", "-c", "../repod.conf", "repo", "importpkg"] + filenames + [repo], capture_output=True, text=True
["poetry", "run", "repod-file", "-c", "../repod.conf", "repo", "importpkg", "--with-signature"] + filenames + [repo], capture_output=True, text=True
)
if p.returncode != 0:
print(f"Failed importing pkgbase {base}, error: {p.stderr}")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment