#13452: Refactor sage-location
Some various clean-up of sage-location, in particular:
1. Don't use realpath() or abspath() everywhere. Just once should be
more than sufficient.
2. Merge initialize_pkgconfig_files() and update_pkgconfig_files().
3. Improve the logic, i.e. install_moved() should not write the
processor flags.
4. Improve structure by creating a new top-level function
sage_relocate() which then calls the other functions.
5. Better documentation.
#13407: Move sage-make_relative to sage-location
There is a rare race condition associated to sage-make_relative: when a
file is open for writing, it cannot be executed (you get a "Text file
busy" error). Since the sage-make_relative Python script opens all files
in $SAGE_LOCAL/bin for writing, it can happen that a Sage build fails.
The best solution is to move sage-make_relative to sage-location: the
latter script is intented precisely to fix relocation issues. It would
also be faster, as currently every file in $SAGE_LOCAL/bin is checked
after every package is installed.
Both these tickets are prerequisites for #5155 (Fix doctests that want
write access to $SAGE_ROOT). I think it would be good to finally fix
this issue, such that Sage works 100% (not 99%) for other users (not the
one who installed Sage). I would like a push to get this into sage-5.4.
So please review:
http://trac.sagemath.org/sage_trac/ticket/13452
http://trac.sagemath.org/sage_trac/ticket/13407
Thanks,
Jeroen.