#9434: Stop greping for a non-existent sage-banner
---------------------------------+------------------------------------------
 Reporter:  drkirkby             |         Owner:  drkirkby                    
     Type:  defect               |        Status:  closed                      
 Priority:  minor                |     Milestone:  sage-4.6.1                  
Component:  build                |    Resolution:  fixed                       
 Keywords:  scripts VERSION.txt  |        Author:  John Palmieri               
 Upstream:  N/A                  |      Reviewer:  Jeroen Demeyer, David Kirkby
   Merged:  sage-4.6.1.alpha3    |   Work_issues:                              
---------------------------------+------------------------------------------

Comment(by jhpalmieri):

 > Does download_file("VERSION.txt") attempt to download a non-existent
 file

 I think that might be the problem.  I thought we tested this with
 upgrades, but obviously not well enough.  How about a patch like this:
 {{{
 #!diff
 diff -r 6e07658dbbd6 -r b35cea7f82c9 sage-sdist
 --- a/sage-sdist
 +++ b/sage-sdist
 @@ -58,6 +58,9 @@ cp -LRp Makefile *.txt *.sage sage ipyth
  STD=standard
  mkdir $TMP/$PKGDIR
  mkdir $TMP/$PKGDIR/$STD
 +# Put VERSION.txt in a directory available for download during the
 +# update process.  (See sage-update.)
 +cp VERSION.txt $TMP/$PKGDIR/$STD/.VERSION.txt
  cp -p $PKGDIR/$STD/deps $TMP/$PKGDIR/$STD/
  cp -p $PKGDIR/$STD/libdist_filelist $TMP/$PKGDIR/$STD/
  cp -p $PKGDIR/$STD/newest_version $TMP/$PKGDIR/$STD/
 diff -r 6e07658dbbd6 -r b35cea7f82c9 sage-update
 --- a/sage-update
 +++ b/sage-update
 @@ -351,11 +351,16 @@ def do_update():
          version_file.close()
      else:
          old_version = ""
 -    download_file("VERSION.txt")
 -    version_file = open("VERSION.txt")
 +    download_file("standard/.VERSION.txt")
 +    version_file = open(".VERSION.txt")
      new_version = version_file.read()
      new_version = new_version.strip()  # remove trailing newline
      version_file.close()
 +    try:
 +        os.remove(os.path.join(SPKG_ROOT, "standard", ".VERSION.txt"))
 +    except OSError:
 +        pass
 +    os.rename(".VERSION.txt", os.path.join(SPKG_ROOT, "standard",
 ".VERSION.txt"))
      # sage-upgrade, hence sage-update, gets run twice during the
      # upgrade process.  If old_version starts with new_version, then
      # this should be the second time through, so don't update the
 }}}
 (The "try ... except" block is probably not necessary except on Windows,
 but it feels safer this way, and who knows, we might eventually support
 Windows.)

 I've created two upgrade paths which include this (one, version "V0", to
 test upgrading from anything else to this, and then the second, version
 "V1", to try upgrading from version "V0"):

  - [http://sage.math.washington.edu/home/palmieri/misc/sage-4.6.1.V0/]
  - [http://sage.math.washington.edu/home/palmieri/misc/sage-4.6.1.V1/]

 We can open up a new ticket with a formally attached patch if this seems
 like the right approach.  I won't have much time to work on this, though:
 I have to focus on grading exams and getting ready for next quarter's
 classes.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9434#comment:37>
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.

Reply via email to