[Git][ghc/ghc][master] 2 commits: get-win32-tarballs: Fix base URL
Marge Bot
gitlab at gitlab.haskell.org
Wed May 13 06:04:03 UTC 2020
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
670c3e5c by Ben Gamari at 2020-05-13T02:03:54-04:00
get-win32-tarballs: Fix base URL
Revert a change previously made for testing purposes.
- - - - -
8ad8dc41 by Ben Gamari at 2020-05-13T02:03:54-04:00
get-win32-tarballs: Improve diagnostics output
- - - - -
1 changed file:
- mk/get-win32-tarballs.py
Changes:
=====================================
mk/get-win32-tarballs.py
=====================================
@@ -5,10 +5,10 @@ from pathlib import Path
import urllib.request
import subprocess
import argparse
+from sys import stderr
TARBALL_VERSION = '0.1'
BASE_URL = "https://downloads.haskell.org/ghc/mingw/{}".format(TARBALL_VERSION)
-BASE_URL = "http://home.smart-cactus.org/~ben/ghc/mingw/{}".format(TARBALL_VERSION)
DEST = Path('ghc-tarballs/mingw-w64')
ARCHS = ['i686', 'x86_64', 'sources']
@@ -19,11 +19,13 @@ def file_url(arch: str, fname: str) -> str:
fname=fname)
def fetch(url: str, dest: Path):
- print('Fetching', url, '=>', dest)
+ print('Fetching', url, '=>', dest, file=stderr)
urllib.request.urlretrieve(url, dest)
def fetch_arch(arch: str):
- req = urllib.request.urlopen(file_url(arch, 'MANIFEST'))
+ manifest_url = file_url(arch, 'MANIFEST')
+ print('Fetching', manifest_url, file=stderr)
+ req = urllib.request.urlopen(manifest_url)
files = req.read().decode('UTF-8').split('\n')
d = DEST / arch
if not d.is_dir():
@@ -36,6 +38,9 @@ def fetch_arch(arch: str):
verify(arch)
def verify(arch: str):
+ if not Path(DEST / arch / "SHA256SUMS").is_file():
+ raise IOError("SHA256SUMS doesn't exist; have you fetched?")
+
cmd = ['sha256sum', '--quiet', '--check', '--ignore-missing', 'SHA256SUMS']
subprocess.check_call(cmd, cwd=DEST / arch)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a03da9bfcf130bec616e0f77bbefbf62022753de...8ad8dc412f0b070df63e42e68468df08ac0f559a
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a03da9bfcf130bec616e0f77bbefbf62022753de...8ad8dc412f0b070df63e42e68468df08ac0f559a
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200513/77877d95/attachment-0001.html>
More information about the ghc-commits
mailing list