New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename top-level makefile to Makefile #10156
Comments
Attachment: 10156_doc.patch.gz sagelib patch |
Attachment: 10156_scripts.patch.gz sage_scripts patch |
Author: Jeroen Demeyer |
comment:2
The renaming is also done by #9433 IIRC. |
comment:3
I wonder if it's safer to use At least there seems to be a lack of error / consistency checking, as always... |
comment:4
Patches look reasonable; I just don't know yet if they catch all instances. |
comment:5
If you thrust the author of the patch to do the test, I am doing the following:
If all this works, I think that #10156 and #10157 are proven to work. |
This comment has been minimized.
This comment has been minimized.
comment:7
Replying to @nexttime:
I don't see why. If we really rename |
Merged: sage-4.6.1.alpha0 |
comment:9
John or Leif: could you review this and #10157 please? I think these patches have received sufficient testing to prove that they work. |
comment:10
The Sage library patch looks fine. For the scripts patch, I haven't tested it at all, but what happens if you upgrade from a version of Sage with a file called "makefile"? Will things break? I don't think it's ever a good idea to run "sage-sdist" or "sage-bdist" from an upgraded version of Sage, but if someone does, what will happen? Would it be a good idea to either use something like [Mm]akefile, as leif suggested, or do something like the following: if [ -e makefile ]; then
cp -$OPT makefile "$TMP"/Makefile
fi (This is for sage-bdist, and you would use something similar in sage-sdist.) |
comment:11
Replying to @jhpalmieri:
W.r.t. making new dists from an upgraded version, hopefully #9433 solves this... ;-) (I don't know if you meant upgrading in general; this works for me. You just still have the old
Nobody should do this, currently. We should perhaps just give an error message in that case (until #9433 is merged). |
comment:12
I don't understand the fine details of upgrading, but would it be possible to copy |
comment:13
Replying to @jdemeyer:
Of course. But I would rename it because (POSIX) |
comment:14
Replying to @nexttime:
On the other hand, if Can any of you implement this? |
Work Issues: copy makefile to Makefile during upgrade |
comment:15
Replying to @jdemeyer:
Note that on OS X, you can't have files called both "makefile" and "Makefile" in the same directory. Also, "makefile" is not used at all during an upgrade, so it should be safe to rename it.
It's taken care of by #9433. If we want to implement it here, I think it should be done in the sage-upgrade script, after running "./install" and checking its exit status: diff -r 4047e578febc sage-upgrade
--- a/sage-upgrade Sat Oct 30 16:05:33 2010 -0700
+++ b/sage-upgrade Tue Nov 09 10:57:40 2010 -0800
@@ -36,3 +36,13 @@
exit 1
fi
+cd "$SAGE_ROOT"
+
+if [ -f makefile ]; then
+ mv makefile Makefile
+fi
+
+if [ $? -ne 0 ]; then
+ echo "Error renaming 'makefile' to 'Makefile'.
+ exit 1
+fi Another option would also check for the existence of 'Makefile' before doing the move: diff -r 4047e578febc sage-upgrade
--- a/sage-upgrade Sat Oct 30 16:05:33 2010 -0700
+++ b/sage-upgrade Tue Nov 09 10:58:47 2010 -0800
@@ -36,3 +36,16 @@
exit 1
fi
+cd "$SAGE_ROOT"
+
+if [ -f makefile ]; then
+ if [ -f Makefile ]; then
+ mv Makefile Makefile.old
+ fi
+ mv makefile Makefile
+fi
+
+if [ $? -ne 0 ]; then
+ echo "Error renaming 'makefile' to 'Makefile'.
+ exit 1
+fi Opinions either way? |
Attachment: 10156_upgrade.patch.gz Additional scripts patch: rename makefile to Makefile during upgrade |
Changed merged from sage-4.6.1.alpha0 to none |
Merged: sage-4.6.1.alpha1 |
comment:18
The first two patches (10156_docs.patch and 10156_scripts.patch) get a positive review from me. This doesn't work, probably my fault. The issue is that the script "sage-upgrade" doesn't get upgraded in the process. So I think moving makefile should happen at the end of the "install" script instead, since this gets downloaded before it gets run. (In particular, upgrading didn't rename "makefile" when I tested it.) Try this patch to "install" instead. |
Changed author from Jeroen Demeyer to Jeroen Demeyer, John Palmieri |
Attachment: install.gz the file spkg/install |
Attachment: install.patch.gz patch for 'install' |
comment:19
Replying to @jhpalmieri:
By "this", I meant the third patch, 10156_upgrade.patch. |
comment:20
For what it's worth, my change to "install" works for me when upgrading on both Mac OS X (with its odd case-sensitivity) and Solaris. I tested upgrading from 4.5.3 (which had "makefile") and 4.6.1.alpha0 (which had "Makefile"). |
This comment has been minimized.
This comment has been minimized.
Changed work issues from copy makefile to Makefile during upgrade to none |
Reviewer: Volker Braun |
comment:23
I successfully updated from sage-4.5.2 on Fedora 13 and the patch did go the extra mile to make sure that it doesn't break upgrades. I'll set it to positive review. |
comment:25
It looks to me there are still a few files that refer to
|
comment:26
Replying to @sagetrac-drkirkby:
These are all in the output directory. Could it be that you did not rebuild the pdf documentation after applying these tickets and are finding the old tex files? |
comment:27
Replying to @jdemeyer:
Yes, it is very possible. I'm just going to build Sage again from scratch, as I've messed around with various files. But I very much doubt I built the pdfs, so that explains it. Dave |
This ticket has a few patches which should be applied when renaming
makefile
toMakefile
. See also #9799.Apply:
CC: @jhpalmieri @nexttime
Component: distribution
Keywords: scripts makefile
Author: Jeroen Demeyer, John Palmieri
Reviewer: Volker Braun
Merged: sage-4.6.1.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/10156
The text was updated successfully, but these errors were encountered: