Ticket #12637: trac_12637-cd-before-rm.patch

File trac_12637-cd-before-rm.patch, 815 bytes (added by jhpalmieri, 8 years ago)

root repo

  • spkg/bin/sage-spkg

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1331064341 28800
    # Node ID 96bf8b25020f1f678b13c72f35dce8f8af1afc1a
    # Parent  6e71c15d1a00c94dd623336581b2d31537d8b37e
    cd out of SAGE_BUILD_DIR/PKG_NAME before deleting that directory
    
    diff --git a/spkg/bin/sage-spkg b/spkg/bin/sage-spkg
    a b cat "$SAGE_ROOT/VERSION.txt" >> "$PKG_NA 
    468468if [ $DELETE_TMP -eq 1 ]; then
    469469    echo "Deleting temporary build directory"
    470470    echo "$SAGE_BUILD_DIR/$PKG_NAME"
     471    # On Solaris, the current working directory cannot be deleted,
     472    # so we "cd" out of $SAGE_BUILD_DIR/$PKG_NAME. See #12637.
     473    cd "$SAGE_BUILD_DIR"
    471474    rm -rf "$SAGE_BUILD_DIR/$PKG_NAME"
    472475else
    473476    echo "You can safely delete the temporary build directory"