#11232: we should not build patch on Cygwin
----------------------------+-----------------------------------------------
Reporter: dimpase | Owner: tbd
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: cygwin | Keywords:
Work_issues: | Upstream: N/A
Reviewer: David Kirkby | Author:
Merged: | Dependencies:
----------------------------+-----------------------------------------------
Comment(by drkirkby):
One reasonable option is to check if the file '{{{/usr/bin/patch}}}'
exists on Cygwin. Checking if the file exists does not need it to be
executed, so I assume that Windows 7 will not object.
Although I've not tested this, adding something like these 4 lines
{{{
if [ "x`uname | sed 's/WIN.\+/WIN/'`" = xCYGWIN ] && [ ! -f /usr/bin/patch
] ; then
echo "On Cygwin one must 'patch' on Cygwin fist. Do it by ..."
exit 1
fi
}}}
to the script {{{$SAGE_ROOT/spkg/base/prereq-0.8-install}}} would allow
one to check if patch is installed early on, before we start building
.spkg's.
The steps to that would be something like:
* Add the above 4 lines to {{{$SAGE_ROOT/spkg/base/prereq-0.8-install}}}
* Change the 10^th^ line of {{{$SAGE_ROOT/spkg/base/prereq-0.8-install}}}
to be '{{{TARGET=prereq-0.9}}}'
* Rename {{{$SAGE_ROOT/spkg/base/prereq-0.8-install}}} to
{{{spkg/base/prereq-0.9-install}}}
* extract the tar file prereq-0.8.tar
* rename the directory {{$SAGE_ROOT/spkg/base/prereq-0.8}}} to
{{$SAGE_ROOT/spkg/base/prereq-0.9}}}
* Create the tar file {{$SAGE_ROOT/spkg/base/prereq-0.9.tar}}} by just
taring up {{$SAGE_ROOT/spkg/base/prereq-0.9}}}
* Remove {{$SAGE_ROOT/spkg/base/prereq-0.8.tar}}} (that file is not under
revision control).
If that was done, there would be an early test for 'patch'.
In that case, patch-2.5.9.p1.spkg would just need to exit with an exit
code of 0 on Cygwin.
Does that sound sensible? I don't think its as good as building patch, but
might be easier to implement.
As John says, the documentation would need to document this, but that can
be added on another ticket.
As long as the updated .spkg and the changes to
{{{$SAGE_ROOT/spkg/base/prereq-0.9-install}}} were merged together, I
think that is a reasonable compromise.
Whatever changes are made, please attach a patch to the ticket so we can
see what is being done.
Dave
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11232#comment:14>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.