From 77470f1e0ec811260f5a32e9dcf0ac084de42de6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 27 Nov 2023 20:15:26 -0800 Subject: [PATCH] sage --package update: Display upstream URL and warn if upstream_url pattern does not use the VERSION variable --- build/sage_bootstrap/updater.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/sage_bootstrap/updater.py b/build/sage_bootstrap/updater.py index 7c1431967a1..67f1c961124 100644 --- a/build/sage_bootstrap/updater.py +++ b/build/sage_bootstrap/updater.py @@ -69,8 +69,11 @@ def _update_version(self, new_version): def download_upstream(self, download_url=None): tarball = self.package.tarball if download_url is None: + pattern = self.package.tarball_upstream_url_pattern + if pattern and 'VERSION' not in pattern: + print('Warning: upstream_url pattern does not use the VERSION variable') download_url = self.package.tarball_upstream_url if download_url is None: raise ValueError("package has no default upstream_url pattern, download_url needed") - print('Downloading tarball to {0}'.format(tarball.upstream_fqn)) + print('Downloading tarball from {0} to {1}'.format(download_url, tarball.upstream_fqn)) Download(download_url, tarball.upstream_fqn).run()