[PATCH v2] build-many-glibcs.py: Include URL in download exception
Florian Weimer
fweimer@redhat.com
Mon Dec 8 22:31:02 GMT 2025
---
v2: Rebased, hopefully this will allow CI to apply the patch.
scripts/build-many-glibcs.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index 586a2d8f83..940b66a09a 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -1074,8 +1074,11 @@ class Context(object):
baseurl = os.environ.get('FTP_GNU_ORG_MIRROR' , 'https://ftp.gnu.org').rstrip('/')
url = url_map[component] % {'version': version, 'major': version_major, 'baseurl': baseurl}
filename = os.path.join(self.srcdir, url.split('/')[-1])
- response = urllib.request.urlopen(url)
- data = response.read()
+ try:
+ with urllib.request.urlopen(url) as response:
+ data = response.read()
+ except:
+ raise IOError('downloading ' + repr(url))
with open(filename, 'wb') as f:
f.write(data)
subprocess.run(['tar', '-C', self.srcdir, '-x', '-f', filename],
base-commit: f56a71097f39f2737e76b3807201a4028e06c611
More information about the Libc-alpha
mailing list