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
Stop greping for a non-existent sage-banner #9434
Comments
comment:1
Well, reading carefully, your error messages can't come from Btw, there are more superfluous quotes. If you want to save another "redundant" process invocation (there are in general many), at the expense of losing some parallelism, substitute
by
(The whole line could be replaced by a single invocation of |
comment:2
Just for the record: grep -c "^grep:" install.log gives me zero for both sequential and parallel builds of Sage 4.5.alpha4 (Ubuntu 9.04). |
comment:3
Hi leif
I'll have to look at this, but its not exactly the most serious Sage bug. Dave |
comment:4
Replying to @sagetrac-drkirkby:
Yes, though I love cats. One of my favorites is: sed -n "/[Vv]ersion/s/ *| *//gp" $SAGE_LOCAL/bin/sage-banner (Spaces in Note that the original version gives two lines for non-finals; it does not remove the vertical bars (nor the whitespace) because the pipe symbol is "superfluously" escaped: :) leif64@portland:~/Sage/sage-4.5.alpha4-serial$ ./sage -v
| Sage Version 4.5.alpha4, Release Date: 2010-07-06 |
* Warning: this is a prerelease version, and it may be unstable. * More important, the discussion is still somewhat off-topic or off-ticket, since - as mentioned - the error messages do not originate from
Obviously, I agree. |
comment:5
I think I've found the real culprit: # Mark that the new package has been installed.
# This file will eventually be a certificate like in OS X.
echo "PACKAGE NAME: $PKG_NAME" > "$PKG_NAME"
echo "INSTALL DATE: `date`" >> "$PKG_NAME"
echo "UNAME: `uname -a`" >> "$PKG_NAME"
echo "Sage VERSION: `grep Sage $SAGE_LOCAL/bin/sage-banner`" >> "$PKG_NAME"
echo "Successfully installed $PKG_NAME" (This is from |
comment:6
Replying to @nexttime:
Yes, it looks like you have. It seems the author was not trying to win a Useless Use of Cat Award. Do you have any idea why some people do not see this error message? If you can produce a patch, I can test it. Dave |
comment:7
Since sage-spkg is in spkg/base and in sage_scripts, while sage-banner is only in sage_scripts, you should see this message for any spkgs installed before sage-scripts. In the most recent version of Sage, deps should install sage_scripts right at the beginning:
So I hope this problem has already been taken care of. Installing sage_scripts itself looks like the only possible problem. |
comment:8
Replying to @sagetrac-drkirkby:
Milestone: Sage 5.0 ;-) I think a file containing (just) the Sage version number should be in |
comment:9
Here's an attempt at fixing this. Three comments:
|
comment:10
To be more precise: with the patch, in a non-upgrade, the file SAGE_ROOT/VERSION.txt will look like this:
I haven't tested the upgrade script yet, but it should produce
|
comment:11
Hmmm, besides I don't like the date format string (which is local time), I don't think Do you intentionally export A non-existing I'd prefer having "Sage version: ... [Last] Upgraded from: ..." on a single line (at least in the log). |
comment:12
You could use ...
if [ -f "$SAGE_ROOT/VERSION.txt" ]; then
sed -i -e "1iSage version: $SAGE_VERSION, Release date: $SAGE_RELEASE_DATE\nUpdated from $OLD_VERSION"
else
... to avoid (Perhaps omit the newline, i.e. replace it by e.g. two spaces.) |
comment:13
And we'd have to make sure the version file doesn't get overwritten later once we have the root repo. |
comment:14
Replying to @nexttime:
Right, I'll fix these.
Note that the Sage version doesn't appear in the log: it should only appear in the files in spkg/installed/. But maybe a single line is cleaner.
We can add VERSION.txt to .hgignore; I think that should do it. |
scripts repo |
comment:16
Attachment: trac_9434-VERSION.txt.patch.gz The new patch also modifies sage-make_devel_packages: when preparing the scripts package, it no longer indiscriminately copies all *.txt files from SAGE_ROOT into the scripts spkg, it just copies COPYING.txt and README.txt. (Thus it won't copy VERSION.txt.) |
comment:17
I wouldn't call Rather than omitting As noted, the version file should be updated before We'd have to extract the new version from some newly downloaded file. (This only works for later Sage versions anyway, unless we handle it in "While you're at it"TM, would you mind quoting more instances of |
comment:18
P.S.: See also #9905 (for the date format). |
comment:19
Replying to @nexttime:
But that would be an even bigger mistake than to use an unnecessary cat, as you are making use of non-POSIX options to Dave |
comment:20
Replying to @nexttime:
I can see from your other reasons that we need to update the version number earlier so my solution won't work, but I see no reason, a priori, not to call
That makes sense.
Why? In general, copying over all *.txt files is a little dangerous, and is part of the reason that the file sage-README-osx.txt appears in the wrong places and isn't currently tracked in any repo. I think if we want to include a file, it should be tracked. If it's automatically generated, I don't see any reason to include it in a repo. If #9433 ever gets reviewed and merged, then all of the *.txt files in SAGE_ROOT will be taken out of the scripts repo in any case.
Right.
How about extracting it from VERSION.txt? I'm attaching a patch which does this, perhaps not in the optimal way, but I think it should work.
I don't have time to do this now. |
comment:40
Using For me, the upgrades that failed were parallel spkg builds. But some parallel spkg upgrades did "succeed," i.e., modulo SageNB not being upgraded. (Were there any other packages not upgraded?) Could when the new |
comment:41
Replying to @qed777:
If that's true, it's probably a better solution (but it needs to be tested properly). |
comment:42
Replying to @qed777:
I would expect it to work from an upgrade path like the one I provided, or like the ones provided by release managers for alpha releases. But if I try to download from a URL like "http://boxen.math.washington.edu/sage/spkg/../COPYING.txt", the file is not found. I think the same would be true of VERSION.txt: I don't think the top-level directory is available on the official Sage mirrors. |
comment:43
Replying to @jhpalmieri:
Well, the file is not found because it doesn't actually exist. So your comment doesn't really prove anything. |
comment:44
I don't see any reason why http://boxen.math.washington.edu/sage/spkg/../COPYING.txt shouldn't work while John's URL works. |
comment:45
Replying to @jdemeyer:
I think that on the official Sage mirrors, none of the top-level files (makefile or Makefile, COPYING.txt, etc.) are available for download via the URLs in the sage-update script. So if we have VERSION.txt only in the top-level, it won't be available for download (unless the scripts which make the official release available are rewritten). That is, after Sage 4.6.1 is released, running "sage -upgrade" with no arguments will fail to download VERSION.txt because that file won't be anywhere on the server. I could be wrong, though. Does anyone know for sure what files are mirrored on the official servers? Browsing around the /home/sagemath directory on sage.math, for example the www-files subdirectory, I don't see 'makefile' anywhere... |
comment:46
Here is the patch quoted above. I think this will work, and I don't think that downloading "../VERSION.txt" will. I'm marking it as needing review, but if anyone wants to try a different approach, please go ahead. |
comment:47
Replying to @jhpalmieri:
Does this mean that |
comment:48
Well, I think |
comment:49
Replying to @qed777:
Just for the record (from IRC):
|
comment:50
|
comment:51
Replying to @jdemeyer:
I agree that the top-level VERSION.txt should be the same as spkg/standard/VERSION.txt, which was not the case in my previous patch. I've fixed that so that once the top-level file is created, it's copied to spkg/standard. (The top-level file contains upgrade information, and since upgrade info may be helpful in tracking down problems, we should keep that one rather than the downloaded one.)
Okay.
Good idea. I'm attaching two patches, one of which just fixes these issues. The other patch, which could be applied on top of the others, does a little miscellaneous clean-up in sage-update, using |
Attachment: trac_9434-VERSION-update.patch.gz scripts repo; apply on top of other patches |
Attachment: trac_9434-os.path.join.patch.gz scripts repo; this patch is optional, so reviewing it should have lower priority |
Changed work issues from Fix download of VERSION.txt to none |
comment:52
The patches look good to me, but I need to do more testing before this can get positive review. |
comment:53
I just created new upgrade paths for further testing: I took a vanilla version of 4.6.1.alpha3 and applied "trac_9434-VERSION-update.patch", then did "./sage -sdist 4.6.1.V0" and "./sage -sdist 4.6.1.V1". Then I applied "trac_9434-os.path.join.patch" and did "./sage -sdist 4.6.1.W0" and "./sage -sdist 4.6.1.W1". The resulting upgrade paths are
|
comment:54
I'm also testing with the upgrade path http://sage.math.washington.edu/home/release/sage-4.6.1.rc0/sage-4.6.1.rc0/ (including also other tickets such as #10176). I currently get the following problem (building an "nameless" package), still investigating:
|
comment:55
Looks good to me ("merged" changed to rc0 because there is an additional patch). |
Changed merged from sage-4.6.1.alpha3 to sage-4.6.1.rc0 |
In install.log, we often see:
I think this is probably due to some code in sage-sage
This will obviously fail if sage-banner does not exist.
Also
The following will save a few bytes of disk space and a few CPU cycles, as it will invoke one less process.
More importantly, we should check that sage-banner exists before doing this, so it does not produce potentially confusing error messages.
Dave
CC: @jhpalmieri
Component: build
Keywords: scripts VERSION.txt
Author: John Palmieri
Reviewer: Jeroen Demeyer, David Kirkby
Merged: sage-4.6.1.rc0
Issue created by migration from https://trac.sagemath.org/ticket/9434
The text was updated successfully, but these errors were encountered: