Changes between Version 18 and Version 19 of Ticket #5155


Ignore:
Timestamp:
10/17/11 21:01:31 (11 years ago)
Author:
jhpalmieri
Comment:

For the scripts patch: should there be any error checking when writing to files? If a sysadmin installs Sage, runs it once (to generate the appropriate files) and then moves it but doesn't run it again, it would be nice if other users got helpful error messages. One issue is the code

    check_processor_flags()
    # Note: install_moved() may also run e.g. initialize_pkgconfig_files().
    if install_moved():
        print "The Sage installation tree may have moved"
        print "(from %s to %s)." % (OLD_SAGE_ROOT, SAGE_ROOT)

The problem is that check_processor_flags and install_moved already try to write to files, so if permissions are bad, the message about the installation tree may not get printed. I'm attaching a patch to apply on top of yours (basically wraps everything in a try...except block).

Also, as discussed at #11760, the alternate implementation (commented out) of searching for SAGE_ROOT using regular expressions was slower than the one currently used, so I just deleted the comments altogether.

I'll keep looking at your patch.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5155 – Description

    v18 v19  
    2727
    2828'''Apply''':
    29  1. [attachment:5155_scripts.patch] to the scripts repository.
     29 1. [attachment:5155_scripts.patch], [attachment:trac_5155-permissions.patch] to the scripts repository.
    3030 1. [attachment:5155_qepcad.patch] to the Sage library.