Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
build/bin/sage-spkg: Handle script packages without package-version.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Sep 24, 2020
1 parent 3ceeaa7 commit 8c4fb4d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,11 @@ PKG_NAME="$PKG_SRC"
PKG_BASE=`echo "$PKG_NAME" | sed 's/-.*//'` # strip version number

# PKG_SRC should look like "package-VERSION" or just "package".
# If VERSION matches the version in build/pkgs or there is no version
# specified, use the local scripts; otherwise we try to find a package
# in upstream.
# VERSION, if provided, must match the version in build/pkgs.
PKG_VER="${PKG_NAME#${PKG_BASE}}"
PKG_VER="${PKG_VER#-}"
PKG_SCRIPTS="$SAGE_ROOT/build/pkgs/$PKG_BASE"
LOCAL_PKG_VER=`cat $PKG_SCRIPTS/package-version.txt 2>/dev/null`
LOCAL_PKG_VER=`cat $PKG_SCRIPTS/package-version.txt 2>/dev/null || echo none`
PKG_VER="$LOCAL_PKG_VER"
if [ -n "$PKG_VER" -a "$PKG_VER" != "$LOCAL_PKG_VER" ]; then
echo >&2 "Error: Selecting a different version of a package is no longer supported"
Expand Down

0 comments on commit 8c4fb4d

Please sign in to comment.