Skip to content

Commit 7ce44fb

Browse files
author
Matthias Koeppe
committed
build/bin/sage-spkg: Use 'sage-package download' instead of lower-level 'sage-download-file'
1 parent 583c8d4 commit 7ce44fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build/bin/sage-spkg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ fi
341341
PKG_BASE_VER=`echo $PKG_VER | sed 's/\.p[0-9][0-9]*$//'`
342342
if [ -f "$PKG_SCRIPTS/checksums.ini" ]; then
343343
# Normal/wheel package
344-
PKG_NAME_UPSTREAM=`lookup_param tarball "$PKG_SCRIPTS/checksums.ini" | sed "s/VERSION/$PKG_BASE_VER/"`
344+
PKG_NAME_UPSTREAM=`lookup_param tarball "$PKG_SCRIPTS/checksums.ini"`
345345
fi
346346

347347
# Set the $SAGE_DESTDIR variable to be passed to the spkg-install
@@ -396,11 +396,11 @@ ensure_pkg_src() { ###############################################
396396
if [ ! -f "$PKG_SRC" ]; then
397397
if [ -n "$PKG_NAME_UPSTREAM" ]; then
398398
# Normal or wheel package
399-
if ! sage-download-file $SAGE_DOWNLOAD_FILE_OPTIONS "$PKG_NAME_UPSTREAM"; then
400-
error_msg "Error downloading $PKG_NAME_UPSTREAM"
399+
PKG_SRC=$(sage-package download $SAGE_DOWNLOAD_FILE_OPTIONS $PKG_BASE)
400+
if [ $? != 0 ]; then
401+
error_msg "Error downloading tarball of $PKG_BASE"
401402
exit 1
402403
fi
403-
PKG_SRC="$SAGE_DISTFILES/$PKG_NAME_UPSTREAM"
404404
# Do a final check that PKG_SRC is a file with an absolute path
405405
cd /
406406
if [ ! -f "$PKG_SRC" ]; then

0 commit comments

Comments
 (0)