Ticket #11021: trac_11021-additional_changes_to_sage-spkg.scripts.patch

File trac_11021-additional_changes_to_sage-spkg.scripts.patch, 20.1 KB (added by leif, 8 years ago)

SCRIPTS repo. Bug fixes, more error checks, improved messages, restructuring. Apply on top of the rebased v2-patch.

  • sage-spkg

    # HG changeset patch
    # User Leif Leonhardy <not.really@online.de>
    # Date 1310043319 -7200
    # Node ID da092dcfe4eae82841faba325c1a22b08c3d02fe
    # Parent  6d670e9222541fc657de996919b8e57f6cec5f80
    #11021 Further improvements: Some bugs fixed, more error checking & appropriate messages... (see below)
    
     * Fixed some bugs, e.g. not recording the version of a package found
       in `spkg/{standard,optional}` such that the installation later
       failed; superfluous second download now doesn't take place.
     * All instances of `build` now use `$BUILD`. (It is now also checked
       that `BUILD` is really set, cf. patch to `sage-env`.)
     * More error checks and more appropriate error messages.
     * Non-conforming spkgs are no longer said to be corrupted.
     * Default installation scripts now use `$MAKE` rather than `make`
       (`$MAKE -j1` for installation).
     * `spkg-check` is now `time`d, too.
     * Trying to install an already installed spkg now suggests using `-f`.
     * Some restructuring and simplification, removed useless code.
     * Lots of comments (including TODOs) added, some cosmetic changes.
    
    diff -r 6d670e922254 -r da092dcfe4ea sage-spkg
    a b  
    4848. "$SAGE_ROOT/local/bin/sage-env" # *returns* non-zero value on errors rather than exiting
    4949 
    5050if [ $? -ne 0 ]; then
    51     echo "Error setting environment variables by running \"$SAGE_ROOT/local/bin/sage-env\";"
    52     echo "possibly contact sage-devel (see http://groups.google.com/group/sage-devel)."
     51    echo >&2 "Error setting environment variables by running"
     52    echo >&2 "    '$SAGE_ROOT/local/bin/sage-env';"
     53    echo >&2 "possibly contact sage-devel (see http://groups.google.com/group/sage-devel)."
     54    exit 1
     55fi
     56
     57# Catch an error currently in sage-env (cf. #10469, #11021):
     58if [ -z "$BUILD" ]; then
     59    error >&2 "Error: Environment variable 'BUILD' not set!"
     60    exit 1
     61fi
     62
     63cd "$SAGE_PACKAGES"
     64if [ $? -ne 0 ]; then
     65    echo >&2 "Error entering directory '$SAGE_PACKAGES'."
     66    exit 1
     67fi
     68mkdir -p installed &&
     69mkdir -p "$BUILD/old" # also creates $BUILD if it doesn't already exist
     70if [ $? -ne 0 ]; then
     71    echo >&2 "Error creating build directories."
    5372    exit 1
    5473fi
    5574
    5675if [ $# -eq 0 ]; then
    5776    echo "Currently installed packages:"
    5877    /bin/ls -1 "$SAGE_PACKAGES/installed/"
    59     exit 0
     78    exit $?
    6079fi
    6180
    62 cd "$SAGE_PACKAGES"
    63 mkdir -p "$BUILD"
    64 mkdir -p installed
    65 cd "$BUILD"
    66 mkdir -p old
    67 
    68 # The following two options are mutually exclusive -- i.e., you
    69 # can give only one.
    70 
    7181INFO=0
    7282if [ "$1" = '-info' ]; then
    7383    INFO=1
     
    7989    FORCE=1
    8090    shift
    8191fi
    82 export FORCE
     92export FORCE # XXX Not immediately clear why; recursive sage-spkg
     93             #     (with force) obviously won't work that way.
    8394
    8495DELETE_TMP=1
    8596if [ "$1" = '-s' -o "$1" = '-m' ]; then
     97    # This keeps files from previous builds
     98    # as well as those of the current build.
    8699    DELETE_TMP=0
    87100    shift
    88101fi
    89102
     103# Note: sage-sage passes the package name (if any) as an absolute filename,
     104#       i.e. prepends the current working directory unless the filename
     105#       given to sage-sage already started with a slash.
     106#
     107# FIXME: If the filename given (e.g. "python") matches a file in the current
     108#        directory (e.g. "$SAGE_LOCAL/bin"), sage-spkg will try to install
     109#        that file, regardless if the filename contains a version or has an
     110#        ".spkg" extension (rather than looking up the latest version of the
     111#        Python package as one would expect).
     112
    90113INSTALLED="$SAGE_PACKAGES/installed/"
    91 PKG_NAME=`echo "$1" | sed -e "s/\.spkg$//"`
    92 PKG_NAME=`basename "$PKG_NAME"`
    93 PKG_SRC="$1"
    94 PKG_BASE=`echo "$PKG_NAME" | sed -e "s/-.*//"`
     114PKG_SRC="$1"                                   # always absolute (see above)
     115PKG_NAME=`echo "$1" | sed -e "s/\.spkg$//"`    # strip extension
     116PKG_NAME=`basename "$PKG_NAME"`                # strip path
     117PKG_BASE=`echo "$PKG_NAME" | sed -e "s/-.*//"` # strip version part
    95118
    96119# Check if noclobber is set and warn about it:
    97120if [ "$PKG_SRC" == "noclobber" ]; then
     
    107130    exit 0
    108131fi
    109132
     133# Assumes we are in $SAGE_PACKAGES (cd'ed to above):
     134
    110135if [ ! -f "$PKG_SRC" ]; then
    111136    if [ -f "$SAGE_PACKAGES/standard/$PKG_NAME.spkg" ]; then
    112137        PKG_SRC="$SAGE_PACKAGES/standard/$PKG_NAME.spkg"
     138    elif [ -f "$SAGE_PACKAGES/optional/$PKG_NAME.spkg" ]; then
     139        PKG_SRC="$SAGE_PACKAGES/optional/$PKG_NAME.spkg"
    113140    else
    114         if [ -f "$SAGE_PACKAGES/optional/$PKG_NAME.spkg" ]; then
    115             PKG_SRC="$SAGE_PACKAGES/optional/$PKG_NAME.spkg"
     141        PKG_NEWEST_VER=`./standard/newest_version "$PKG_NAME" 2>/dev/null`
     142        if [ -n "$PKG_NEWEST_VER" ]; then
     143            PKG_SRC="$SAGE_PACKAGES/standard/$PKG_NEWEST_VER.spkg"
     144            PKG_NAME="$PKG_NEWEST_VER"
    116145        else
    117             CUR=`pwd`
    118             cd "$SAGE_PACKAGES"
    119             PKG_NEWEST_VER=`./standard/newest_version "$PKG_NAME" 2> /dev/null`
     146            PKG_NEWEST_VER=`./standard/newest_version -base "$PKG_NAME" 2>/dev/null`
    120147            if [ -n "$PKG_NEWEST_VER" ]; then
    121                 PKG_SRC="$SAGE_PACKAGES/standard/$PKG_NEWEST_VER.spkg"
    122             else
    123                 PKG_NEWEST_VER=`./standard/newest_version -base "$PKG_NAME" 2> /dev/null`
    124                 if [ -n "$PKG_NEWEST_VER" ]; then
    125                     PKG_SRC="$SAGE_PACKAGES/standard/$PKG_NEWEST_VER.spkg"
    126                 fi
     148                PKG_SRC="$SAGE_PACKAGES/base/$PKG_NEWEST_VER.spkg"
     149                PKG_NAME="$PKG_NEWEST_VER"
    127150            fi
    128151        fi
    129152    fi
     
    139162
    140163if [ $INFO -ne 0 ]; then
    141164    if [ ! -f "$PKG_SRC" ]; then
    142         echo "Package $PKG_NAME not found" >&2
     165        echo >&2 "Error: Package '$PKG_NAME' not found."
    143166        exit 1
    144167    fi
    145168    bunzip2 -c "$PKG_SRC" 2>/dev/null | tar Ofx${UNTAR_VERBOSE} - "$PKG_NAME/SPKG.txt" 2>/dev/null
     
    147170        tar Ofx${UNTAR_VERBOSE} "$PKG_SRC" "$PKG_NAME/SPKG.txt" 2>/dev/null
    148171    fi
    149172    if [ $? -ne 0 ]; then
    150         echo "No file SPKG.txt in package $PKG_NAME" >&2
    151         exit 1
     173        # Extracting SPKG.txt failed for *some* reason,
     174        # now check if it's simply missing:
     175        if (bunzip2 -c "$PKG_SRC" | tar tf -) &>/dev/null ||
     176            tar tf "$PKG_SRC" &>/dev/null
     177        then
     178            echo "Package '$PKG_NAME' lacks a description (SPKG.txt file)."
     179            exit 0 # Not really an error.
     180        else
     181            echo >&2 "Error: '$PKG_SRC' seems to be corrupted. Exiting."
     182            exit 1
     183        fi
    152184    fi
    153     exit 0
     185    exit 0 # redundant but safe and more readable
    154186fi
    155187
    156 echo "$PKG_NAME"
     188# Install the package:
     189
     190echo "Installing '$PKG_NAME'..." # Better print full path ($PKG_SRC) here?
    157191
    158192echo "Machine:"
    159193uname -a
    160194
    161195if [ -f "$INSTALLED/$PKG_NAME" -a $FORCE -eq 0 ]; then
    162     echo "sage: $1 is already installed"
    163     touch "$INSTALLED/$PKG_NAME"
     196    echo "'$PKG_NAME' is already installed."
     197    echo "Use 'sage -f $PKG_NAME' to force a reinstallation."
     198    touch "$INSTALLED/$PKG_NAME" # XXX Why?
    164199    exit 0
    165200fi
    166201
    167202cd "$SAGE_PACKAGES/$BUILD"
    168203
    169204if [ $DELETE_TMP -eq 1 ]; then
    170     echo "Deleting directories from past builds of previous/current versions of $PKG_NAME"
     205    echo "Deleting directories from past builds of previous/current"
     206    echo "versions of '$PKG_NAME'..."
    171207    # Make triply sure that we are in the build directory before doing
    172208    # a scary "rm -rf".
    173209    cd "$SAGE_PACKAGES/$BUILD"
    174210    if [ $? -ne 0 ]; then
    175         echo "Unable to find build directory." >&2
     211        # This should actually never happen, as we have created it above.
     212        echo >&2 "Warning: Unable to find build directory '$SAGE_PACKAGES/$BUILD'."
    176213    else
    177         rm -rf "$PKG_BASE-"*
     214        rm -rf "$PKG_BASE-"* 2>/dev/null
    178215    fi
    179216else
    180     echo "Moving directories from past builds of previous/current versions of $PKG_NAME to build/old"
    181     mv -f "$PKG_BASE-"* old/  2>/dev/null
     217    echo "Moving directories from past builds of previous/current"
     218    echo "versions of '$PKG_NAME' to '$BUILD/old'..."
     219    mv -f "$PKG_BASE-"* old/ 2>/dev/null
    182220fi
    183221
    184222if [ ! -f "$PKG_SRC" ]; then
    185223
    186     echo "$0: file $PKG_NAME does not exist"
    187     echo "Attempting to download it."
    188     CUR=`pwd`
     224    echo "$0: File '$PKG_SRC' does not exist."
     225    echo "Attempting to download it..."
     226
     227    CUR=`pwd` # should be $SAGE_PACKAGES/$BUILD
    189228    cd "$SAGE_PACKAGES"
    190     if [ ! -d optional ]; then
    191         mkdir optional
    192     fi
     229    mkdir -p optional
    193230    cd optional
    194231
    195232    FOUND_VERSION=''
    196233    if [ -n "`no_version "$PKG_NAME"`" ]; then
    197234        # No version was given on the command line.
    198         echo "Searching for latest version of $PKG_NAME"
     235        echo "Searching for the latest version of '$PKG_NAME'..."
    199236        PKG_NAME=`sage-latest-online-package "$PKG_NAME"`
    200237        if [ $? -eq 0 ]; then
    201             echo "Found package $PKG_NAME"
     238            echo "Found package '$PKG_NAME'."
    202239            FOUND_VERSION='1'
    203240        else
    204             echo "$PKG_NAME"
     241            echo >&2 "$PKG_NAME" # That's now an error message.
    205242            exit 1
    206243        fi
    207244    fi
     
    226263    # download the package specified by $1, since it either already
    227264    # contains the version number or is a URL.
    228265    if [ "x$FOUND_VERSION" = "x" ]; then
     266        # XXX I doubt this still works, at least when sage-spkg was called
     267        #     from sage-sage, which prepends the current working directory
     268        #     unless the filename (or whatever) given starts with a slash:
    229269        sage-download_package "$1"
    230270    else
    231         sage-download_package "$PKG_NAME"
     271        sage-download_package "$PKG_NAME" # as found above (online)
    232272    fi
    233273    if [ ! -f "$PKG_NAME.spkg" ]; then
    234         echo "sage: Failed to download package $PKG_NAME from $SAGE_SERVER" >&2
     274        echo >&2 "Error: Failed to download package '$PKG_NAME' from '$SAGE_SERVER'."
    235275        exit 1
    236276    fi
    237     PKG_SRC="`pwd`/$PKG_NAME.spkg"
    238     cd "$CUR"
    239 fi
     277    PKG_SRC="`pwd`/$PKG_NAME.spkg" # should be located in $SAGE_PACKAGES/optional
     278    cd "$CUR" # should now be $SAGE_PACKAGES/$BUILD again
    240279
    241 # * The -i option below is to ignore checksum errors, since
    242 #   I've had problems with this on Solaris.
    243 # * The m option avoids clock skew problems.
    244 
    245 echo "Extracting package $PKG_SRC ..."
    246 ls -l "$PKG_SRC"
     280fi # PKG_SRC did not exist
    247281
    248282if [ -d "$PKG_NAME" ]; then
    249     echo "Removing previous version."
     283    echo "Removing previous version of '$PKG_NAME'..."
    250284    rm -rf "$PKG_NAME"
    251285fi
    252286
    253 bunzip2 -c "$PKG_SRC" 2>/dev/null | tar fx${UNTAR_VERBOSE} - 2>/dev/null
    254 if [ ! -d "$PKG_NAME" ]; then
    255     # Maybe the spkg wasn't compressed, so retry with plain 'tar':
     287echo "Extracting package '$PKG_SRC'..."
     288ls -l "$PKG_SRC"
     289
     290(bunzip2 -c "$PKG_SRC" | tar fx${UNTAR_VERBOSE} - ) 2>/dev/null ||
    256291    tar fx${UNTAR_VERBOSE} "$PKG_SRC"
     292if [ $? -ne 0 ]; then
     293    echo >&2 "Warning: 'PKG_SRC'"
     294    echo >&2 "          appears to be neither a .tar nor a .tar.bz2 file."
     295    echo >&2 "          Maybe it is corrupted."
     296    # Could in principle exit here, but we retry a[nother] download below.
     297else
     298    echo "Finished extraction."
    257299fi
    258 echo "Finished extraction"
    259300
    260301if [ ! -d "$PKG_NAME" ]; then
    261     echo "sage: After decompressing the directory $PKG_NAME does not exist"
    262     echo "This means that the corresponding .spkg needs to be downloaded"
    263     echo "again."
     302    # Note that this also happens for non-conforming spkgs (e.g.
     303    # renamed ones, or with a wrong directory structure / name).
     304    echo >&2 "Warning: After extraction the directory '$PKG_NAME' does not exist."
     305    echo >&2 "This means that the corresponding .spkg needs to be downloaded again."
    264306    if [ -n "`no_version "$PKG_NAME"`" ]; then
    265         echo "Searching for latest version of $PKG_NAME"
     307        echo "Searching for the latest version of '$PKG_NAME'..."
    266308        PKG_NAME=`sage-latest-online-package "$PKG_NAME"`
    267309        if [ $? -eq 0 ]; then
    268             echo "Found package $PKG_NAME"
     310            echo "Found package '$PKG_NAME'."
    269311        else
    270             echo "$PKG_NAME"
     312            echo >&2 "$PKG_NAME" # That's now an error message.
    271313            exit 1
    272314        fi
    273315    fi
    274316    sage-download_package "$PKG_NAME"
    275     echo `pwd`
    276     bunzip2 -c "$PKG_NAME.spkg" | tar fx${UNTAR_VERBOSE} -
    277     if [ ! -d "$PKG_NAME.spkg" ]; then
    278         # Maybe the spkg wasn't compressed, so retry with plain 'tar':
     317    if [ ! -f "$PKG_NAME.spkg" ]; then
     318        echo >&2 "Error: Failed to download package '$PKG_NAME' for the second time."
     319        exit 1
     320    fi
     321    PKG_SRC="`pwd`/$PKG_NAME.spkg"
     322    echo "Extracting package '$PKG_SRC'..."
     323    (bunzip2 -c "$PKG_NAME.spkg" | tar fx${UNTAR_VERBOSE} - ) 2>/dev/null ||
    279324        tar fx${UNTAR_VERBOSE} "$PKG_NAME.spkg"
     325    if [ $? -ne 0 ]; then
     326        echo >&2 "Error: The second downloaded package appears to be corrupted:"
     327        ls -l "$PKG_SRC"
     328        exit 1
    280329    fi
    281330    if [ ! -d "$PKG_NAME" ]; then
    282         echo "Second download resulted in a corrupted package." >&2
     331        echo >&2 "Error: After extraction the directory '`pwd`/$PKG_NAME'"
     332        echo >&2 "does not exist. Exiting."
    283333        exit 1
    284334    fi
    285335fi
    286336
    287337cd "$PKG_NAME"
    288338if [ ! -f spkg-install ]; then
     339    # Create a default installation file:
    289340    echo "#!/usr/bin/env bash" > spkg-install
    290341    echo "" >> spkg-install
    291342    if [ -f setup.py ]; then
    292343        echo "python setup.py install" >> spkg-install
     344    elif [ -f configure ]; then
     345        echo "./configure --prefix=\"\$SAGE_ROOT/local/\"" >> spkg-install
     346        echo "$MAKE" >> spkg-install
     347        echo "$MAKE -j1 install" >> spkg-install
    293348    else
    294         if [ -f configure ]; then
    295             echo "./configure --prefix=\"\$SAGE_ROOT/local/\"" >> spkg-install
    296             echo "make" >> spkg-install
    297             echo "make install" >> spkg-install
    298         else
    299             echo "There is no spkg-install script, no setup.py, and no configure script," >&2
    300             echo "so I do not know how to install $PKG_SRC." >&2
    301             exit 1
    302         fi
     349        echo >&2 "Error: There is no spkg-install script, no setup.py, and no configure"
     350        echo >&2 "script, so I do not know how to install '$PKG_SRC'."
     351        exit 1
    303352    fi
    304353fi
    305354
    306355chmod +x spkg-install
    307356
    308 # this is just wrong... (so don't do it)
    309 #echo "TOUCHING"
    310 #touch * */* */*/* */*/*/* 1>/dev/null 2>/dev/null
    311 
    312357print_separator
    313358echo "Host system"
    314359echo "uname -a:"
    315360uname -a
    316361if [ $? -ne 0 ]; then
    317     echo "Warning: Unable to determine host system information." >&2
     362    echo >&2 "Warning: Unable to determine host system information."
    318363fi
    319364print_separator
    320365
     
    323368echo "$CC -v:"
    324369$CC -v
    325370if [ $? -ne 0 ]; then
    326     echo "Warning: Unable to determine C compiler version." >&2
     371    echo >&2 "Warning: Unable to determine C compiler version."
    327372fi
    328373print_separator
    329374
     
    338383    # Now check if Sage's python program is already installed:
    339384    if [ ! -f "$SAGE_LOCAL"/bin/python ]; then
    340385         # If not, exit with an error:
    341          echo "Error: The spkg-install script depends on the Sage Python package," >&2
    342          echo "but the Sage Python package is not yet installed.  This may be" >&2
    343          echo "a bug in the Sage build system dependency file.  Please" >&2
    344          echo "update the '$SAGE_ROOT/spkg/standard/deps' makefile." >&2
     386         echo >&2 "Error: The spkg-install script depends on the Sage Python package,"
     387         echo >&2 "       but the Sage Python package is not yet installed.  This may"
     388         echo >&2 "       be a bug in the Sage build system dependency file.  Please"
     389         echo >&2 "       update the '$SAGE_ROOT/spkg/standard/deps' makefile."
    345390         exit 1
    346391    fi
    347392fi
    348393
    349394BASEDIR=`pwd`
    350 if [ -n "$DEBIAN_RELEASE" ]; then
     395if [ -n "$DEBIAN_RELEASE" ]; then # XXX Can we remove the Debian stuff completely?
    351396    SAGE_CHECK=''
    352397    if [ -e ./spkg-debian ]; then
    353398        time ./spkg-debian
     
    360405
    361406if [ $? -eq 0 ]; then
    362407    cd "$INSTALLED"
     408
    363409    # TURNED OFF: Remove all old packages with the same name up to the first "-":
    364410    # rm -f $PKG_BASE-*
    365411
     
    371417    if [ -f "$SAGE_ROOT"/VERSION.txt ]; then
    372418        cat "$SAGE_ROOT"/VERSION.txt >> "$PKG_NAME"
    373419    fi
    374     echo "Successfully installed $PKG_NAME"
     420    print_separator
     421    echo "Successfully installed '$PKG_NAME'."
    375422
    376423    cd "$BASEDIR"
    377424    if [ "x$SAGE_CHECK" = "xyes" -a -f spkg-check ]; then
     
    379426        #       without making errors fatal, which would be convenient for
    380427        #       the Python package (whose test suite fails on almost all
    381428        #       Linux systems and some others) and also porting.
    382         echo "Running the test suite."
     429        echo "Running the test suite..."
    383430        chmod +x spkg-check
    384         ./spkg-check
     431        time ./spkg-check
    385432        if [ $? -ne 0 ]; then
    386433            print_separator >&2
    387 
    388             echo "Error testing package $PKG_NAME." >&2
    389 
     434            # This should also have been reported by spkg-check:
     435            echo "Error testing package '$PKG_NAME'." >&2
    390436            print_separator >&2
    391437            rm -f "$SAGE_ROOT/spkg/installed/$PKG_NAME"
    392             echo "sage: An error occurred while testing $PKG_NAME" >&2
     438            echo "sage: An error occurred while testing '$PKG_NAME'." >&2
     439            # XXX Put this into a function to be reused:
    393440            echo "Please email sage-devel http://groups.google.com/group/sage-devel" >&2
    394441            echo "explaining the problem and send the relevant part of" >&2
    395             echo "of $SAGE_ROOT/install.log.  Describe your computer, operating system, etc." >&2
     442            echo "'$SAGE_ROOT/install.log'." >&2
     443            echo "Describe your computer, operating system, etc." >&2
    396444            echo "If you want to try to fix the problem yourself, *don't* just cd to" >&2
    397445            echo "`pwd` and type 'make check' or whatever is appropriate." >&2
    398446            echo "Instead, the following commands setup all environment variables" >&2
     
    403451            exit 1
    404452        else
    405453            echo "TEST SUITE: passed" >> "$INSTALLED/$PKG_NAME"
     454            # A successful test suite run is (usually) reported by spkg-check.
     455            print_separator
    406456        fi
    407457    fi
    408458
    409 
    410     # Delete the temporary build directory if required.
     459    # Delete the temporary build directory if desired.
    411460    if [ $DELETE_TMP -eq 1 ]; then
    412         echo "Now cleaning up temporary files."
    413         if [ -d "$SAGE_PACKAGES/build/$PKG_NAME" ]; then
    414            # The if is there only to avoid the possibility of a weird bug.
    415             rm -rf "$SAGE_PACKAGES/build/$PKG_NAME"
     461        echo "Now cleaning up temporary files..."
     462        if [ -d "$SAGE_PACKAGES/$BUILD/$PKG_NAME" ]; then
     463            # The if is there only to avoid the possibility of a weird bug.
     464            rm -rf "$SAGE_PACKAGES/$BUILD/$PKG_NAME"
    416465        fi
    417466    else
    418467        echo "You can safely delete the temporary build directory"
    419         echo "$SAGE_PACKAGES/build/$PKG_NAME"
     468        echo "'$SAGE_PACKAGES/$BUILD/$PKG_NAME'."
    420469    fi
    421 
    422470else
    423471    # 'spkg-install' returned non-zero exit code:
    424472    print_separator >&2
    425 
    426     echo "Error installing package $PKG_NAME." >&2
    427 
     473    echo >&2 "Error installing package '$PKG_NAME'."
    428474    print_separator >&2
    429     echo "sage: An error occurred while installing $PKG_NAME" >&2
     475    echo "sage: An error occurred while installing '$PKG_NAME'." >&2
     476    # XXX Put this into a function to be reused:
    430477    echo "Please email sage-devel http://groups.google.com/group/sage-devel" >&2
    431478    echo "explaining the problem and send the relevant part of" >&2
    432     echo "of $SAGE_ROOT/install.log.  Describe your computer, operating system, etc." >&2
     479    echo "'$SAGE_ROOT/install.log'." >&2
     480    echo "Describe your computer, operating system, etc." >&2
    433481    echo "If you want to try to fix the problem yourself, *don't* just cd to" >&2
    434482    echo "`pwd` and type 'make check' or whatever is appropriate." >&2
    435483    echo "Instead, the following commands setup all environment variables" >&2
     
    444492echo "Making Sage/Python scripts relocatable..."
    445493
    446494cd "$SAGE_LOCAL"/bin
    447 ./sage-make_relative
     495./sage-make_relative # Redirect stderr to /dev/null here?
    448496
    449 echo "Finished installing $PKG_NAME.spkg"
     497echo "Finished installing '$PKG_NAME.spkg'."
    450498
    451499# It's OK if the above fails -- in fact it will until Python
    452500# itself gets installed. That's fine.