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
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/MakefileThen (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.
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
doneI 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.
Should this be using the same logic as make dist to determine what to download?
Replying to @jhpalmieri:
Should this be using the same logic as
make distto determine what to download?
That's my instinct. We probably don't need both make download-for-sdist and make download in that case.
Branch: u/mkoeppe/fix_make_download
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:
044fcc0 | Move sage-list-packages from src/bin (sagelib) to build/bin (sage_bootstrap) |
896544f | Move sage-download-upstream from src/bin (sagelib) to build/bin (sage_bootstrap) |
Author: John Palmieri, Matthias Koeppe
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).
Changed keywords from none to download
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
e09d7da | Move sage-download-upstream from src/bin (sagelib) to build/bin (sage_bootstrap) |
ca87916 | Makefile: Update documentation of 'make download' |
039fed7 | src/doc/en/installation/source.rst: Remove outdated documentation on old-style packages |
(pushed to wrong ticket)
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
Changed author from John Palmieri, Matthias Koeppe to none
Reviewer: Dima Pasechnik