Ticket #11021: trac_11021-export_BUILD_in_sage-env.scripts.patch

File trac_11021-export_BUILD_in_sage-env.scripts.patch, 986 bytes (added by leif, 8 years ago)

SCRIPTS repo. Fix BUILD not being set if sage-env is sourced a second time. Based on Sage 4.7.1.alpha4.

  • sage-env

    # HG changeset patch
    # User Leif Leonhardy <not.really@online.de>
    # Date 1310012314 -7200
    # Node ID 7be38304209ccf0ccb32ee5bb1782f00abc9c05a
    # Parent  eb463c4f45e2afcc6d083d0df24e5e5d7166661f
    #11021: Fix BUILD not getting set when sage-env is sourced a second time by a different script.
    
    This bug was introduced (or became effective) by #10469, which implemented
    sourcing sage-env (effectively) only once.
    
    sage-spkg relies on BUILD being set (to "build"), so will fail if it is
    called indirectly through sage-sage, which will already have sourced
    sage-env.
    
    diff -r eb463c4f45e2 -r 7be38304209c sage-env
    a b  
    126126fi
    127127
    128128# Setting Sage-related location environment variables.
    129 BUILD=build
     129BUILD=build && export BUILD
    130130SAGE_PACKAGES="$SAGE_ROOT/spkg" && export SAGE_PACKAGES
    131131SAGE_LOCAL="$SAGE_ROOT/local"   && export SAGE_LOCAL
    132132SAGE_DATA="$SAGE_ROOT/data"     && export SAGE_DATA