Ticket #7799 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

install_scripts should not install M2

Reported by: novoselt Owned by: tbd
Priority: major Milestone: sage-4.3.1
Component: distribution Keywords:
Cc: Work issues:
Report Upstream: N/A Reviewers: Andrey Novoseltsev
Authors: John Palmieri Merged in: sage-4.3.1.alpha0
Dependencies: Stopgaps:

Description

I have done

install_scripts("/usr/local/bin/")

on a Ubuntu machine with installed Macaulay2 and it stopped working. Apparently, M2 is one of the scripts that the above command has copied and it tries to use M2 shipped with Sage. However, Sage does not include Macaulay2, the package for it is broken and the recommended way to use them together is to install Macaulay2 separately. This works fine before installing scripts and after, if I remove M2 from /usr/local/bin manually.

Attachments

trac_7799-install-scripts.patch Download (3.1 KB) - added by jhpalmieri 3 years ago.
patch for main Sage repository

Change History

comment:1 Changed 3 years ago by jhpalmieri

  • Status changed from new to needs_review
  • Authors set to John Palmieri

Here's a patch. I think that the problem is, in the old version, the command 'which M2' was executed, and if it didn't return a system error (meaning that M2 didn't exist), then it installed the Sage script. The patch changes it so it checks if 'which M2' returns an error, and if not, then whether 'which M2' starts with SAGE_ROOT. If not, then M2 is already installed elsewhere, so don't install the Sage script. (Of course it does this for all of the scripts, not just for M2.)

I've also added a doctest.

We could also worry about whether M2 should be included here at all, given its status. I suggest that we keep it, since if my patch works the way I think, we should never install the script as long as we don't distribute a working version of M2, but if someone fixes the spkg for it, then we don't have to remember to reinstate it in 'install_scripts'.

Changed 3 years ago by jhpalmieri

patch for main Sage repository

comment:2 Changed 3 years ago by novoselt

  • Status changed from needs_review to positive_review
  • Reviewers set to Andrey Novoseltsev

Works fine for me, install_scripts does not break Macaulay2 with this patch.

comment:3 Changed 3 years ago by was

Another positive review from me.

comment:4 Changed 3 years ago by mhansen

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-4.3.1.alpha0
Note: See TracTickets for help on using tickets.