sagemath/sage

fix make download

Closed this issue · 24 comments

This is broken, as reported on
https://groups.google.com/d/msg/sage-devel/KA8tI5GsFX4/1KIV2iuIBwAJ

Depends on #30865

CC: @saliola @mkoeppe @orlitzky @slel @vbraun

Component: distribution

Keywords: download

Branch/Commit: u/mkoeppe/fix_make_download @ 039fed7

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/29896

comment:2

One option:

diff --git a/Makefile b/Makefile
index 822d1d316f..74863704b1 100644
--- a/Makefile
+++ b/Makefile
@@ -61,9 +61,9 @@ buildbot-python3:
        $(MAKE)
 
 # Preemptively download all standard upstream source tarballs.
-download:
+download: build/make/Makefile
        export SAGE_ROOT=$$(pwd) && \
-       export PATH=$$SAGE_ROOT/src/bin:$$PATH && \
+       export PATH=$$SAGE_ROOT/build/bin:$$SAGE_ROOT/src/bin:$$PATH && \
        ./src/bin/sage-download-upstream
 
 dist: build/make/Makefile

Then (after #29316) users will be warned that they have to run ./configure first. For me, if I've run ./configure, this modified version of make download works.

comment:3

Although there is another issue: make download says that it downloads the standard upstream source tarballs, but it actually downloads tarballs for standard, optional, and experimental (after querying) packages. At least one of the experimental database packages is pretty big, so maybe we don't want to do this. With #20104, we could do this:

diff --git a/src/bin/sage-download-upstream b/src/bin/sage-download-upstream
index c5d9afe31e..226806ab7d 100755
--- a/src/bin/sage-download-upstream
+++ b/src/bin/sage-download-upstream
@@ -1,8 +1,8 @@
 #!/usr/bin/env bash
 
-for pkg in $SAGE_ROOT/build/pkgs/*
+for pkg in `sage --package list :standard:`
 do
-    if [ -d $pkg ]; then
+    if [ -d $SAGE_ROOT/build/pkgs/$pkg ]; then
         sage-spkg -d `basename $pkg`
     fi
 done
comment:5

I could also imagine trying to use the results from ./configure to decide which packages to download, which to skip because they are already available from the system. But if someone wants to download once and then distribute to colleagues on a thumb drive, it's a good idea to have all of the standard packages.

comment:7

Should this be using the same logic as make dist to determine what to download?

comment:8

Replying to @jhpalmieri:

Should this be using the same logic as make dist to determine what to download?

That's my instinct. We probably don't need both make download-for-sdist and make download in that case.

Dependencies: #30846

comment:12

The branch "fixes" make download (and also cleans up src/bin/ a bit more, on top of #30846 and similar earlier tickets).

I don't use this myself, so I don't know what is the best way to proceed regarding "standard" vs. "all" vs. "configured" packages. Perhaps they should be 3 different make targets.


New commits:

044fcc0Move sage-list-packages from src/bin (sagelib) to build/bin (sage_bootstrap)
896544fMove sage-download-upstream from src/bin (sagelib) to build/bin (sage_bootstrap)

Commit: 896544f

Author: John Palmieri, Matthias Koeppe

slel commented
comment:13

In case that is relevant to the present ticket: our release manager
says: "If there were a command-line switch to download all standard

  • optional + experimental packages then I could test that..." (i.e.
    test they all download properly, to avoid missing upstream tarballs
    on our download mirrors after package upgrade tickets get merged).
slel commented

Changed keywords from none to download

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

e09d7daMove sage-download-upstream from src/bin (sagelib) to build/bin (sage_bootstrap)
ca87916Makefile: Update documentation of 'make download'
039fed7src/doc/en/installation/source.rst: Remove outdated documentation on old-style packages

Changed commit from 896544f to 039fed7

comment:17

No longer depends on #30846

Changed dependencies from #30846 to none

comment:18

(pushed to wrong ticket)

Changed commit from 039fed7 to e263510

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

Changed commit from e263510 to 039fed7

comment:20

Actually best to go through #30865, sage -package download :all:

Changed author from John Palmieri, Matthias Koeppe to none

Dependencies: #30865

Reviewer: Dima Pasechnik