make server: snapshot source catalog, set local cache

This commit is contained in:
Matthew Flatt 2014-08-26 14:34:44 -06:00
parent 5fd46a4d9a
commit edf140a440
2 changed files with 17 additions and 12 deletions

View File

@ -159,7 +159,8 @@ racket/src/build/Makefile: racket/src/configure racket/src/Makefile.in
# Catalog for sources and native packages; use "local" to bootstrap # Catalog for sources and native packages; use "local" to bootstrap
# from package directories (in the same directory as this makefile) # from package directories (in the same directory as this makefile)
# plus the GitHub repository of raw native libraries. Otherwise, it's # plus the GitHub repository of raw native libraries. Otherwise, it's
# a URL (spaces allowed). # a catalog URL (spaces allowed), and the catalog is copied to ensure
# consistency across queries:
SRC_CATALOG = local SRC_CATALOG = local
# A URL embedded in documentation for remote searches, where a Racket # A URL embedded in documentation for remote searches, where a Racket
@ -284,7 +285,7 @@ WIN32_RACO = racket\racket $(USER_CONFIG) -N raco -l- raco
X_AUTO_OPTIONS = --skip-installed --deps search-auto --pkgs $(JOB_OPTIONS) X_AUTO_OPTIONS = --skip-installed --deps search-auto --pkgs $(JOB_OPTIONS)
USER_AUTO_OPTIONS = --scope user $(X_AUTO_OPTIONS) USER_AUTO_OPTIONS = --scope user $(X_AUTO_OPTIONS)
LOCAL_USER_AUTO = --catalog build/local/catalog $(USER_AUTO_OPTIONS) LOCAL_USER_AUTO = --catalog build/local/catalog $(USER_AUTO_OPTIONS)
SOURCE_USER_AUTO_q = --catalog "$(SRC_CATALOG)" $(USER_AUTO_OPTIONS) SOURCE_USER_AUTO_q = --catalog build/catalog-copy $(USER_AUTO_OPTIONS)
REMOTE_USER_AUTO = --catalog $(SVR_CAT) $(USER_AUTO_OPTIONS) REMOTE_USER_AUTO = --catalog $(SVR_CAT) $(USER_AUTO_OPTIONS)
REMOTE_INST_AUTO = --catalog $(SVR_CAT) --scope installation $(X_AUTO_OPTIONS) REMOTE_INST_AUTO = --catalog $(SVR_CAT) --scope installation $(X_AUTO_OPTIONS)
CONFIG_MODE_q = "$(CONFIG)" "$(CONFIG_MODE)" CONFIG_MODE_q = "$(CONFIG)" "$(CONFIG_MODE)"
@ -389,7 +390,12 @@ fresh-user:
rm -rf build/user rm -rf build/user
set-server-config: set-server-config:
$(RACKET) -l distro-build/set-server-config build/user/config/config.rktd $(CONFIG_MODE_q) "$(DOC_SEARCH)" "" "" "" $(RACKET) -l distro-build/set-server-config build/user/config/config.rktd $(CONFIG_MODE_q) "" "" "$(DOC_SEARCH)" ""
server-cache-config:
$(RACO) pkg config -i --set download-cache-dir build/cache
$(RACO) pkg config -i --set download-cache-max-files 1023
$(RACO) pkg config -i --set download-cache-max-bytes 671088640
# Install packages from the source copies in this directory. The # Install packages from the source copies in this directory. The
# packages are installed in user scope, but we set the add-on # packages are installed in user scope, but we set the add-on
@ -408,9 +414,12 @@ packages-from-local:
# `SRC_CATALOG': # `SRC_CATALOG':
build-from-catalog: build-from-catalog:
$(MAKE) fresh-user $(MAKE) fresh-user
rm -rf build/catalog-copy
$(RACO) pkg catalog-copy "$(SRC_CATALOG)" build/catalog-copy
$(MAKE) server-cache-config
$(RACO) pkg install --all-platforms $(SOURCE_USER_AUTO_q) $(REQUIRED_PKGS) $(DISTRO_BUILD_PKGS) $(RACO) pkg install --all-platforms $(SOURCE_USER_AUTO_q) $(REQUIRED_PKGS) $(DISTRO_BUILD_PKGS)
$(MAKE) set-server-config $(MAKE) set-server-config
$(RACKET) -l- distro-build/pkg-info -o build/pkgs.rktd $(SRC_CATALOG) $(RACKET) -l- distro-build/pkg-info -o build/pkgs.rktd build/catalog-copy
$(RACKET) -l distro-build/install-pkgs $(CONFIG_MODE_q) "$(PKGS)" $(SOURCE_USER_AUTO_q) --all-platforms $(RACKET) -l distro-build/install-pkgs $(CONFIG_MODE_q) "$(PKGS)" $(SOURCE_USER_AUTO_q) --all-platforms
$(RACO) setup --avoid-main $(JOB_OPTIONS) $(RACO) setup --avoid-main $(JOB_OPTIONS)

View File

@ -2655,14 +2655,10 @@
(update-pkg-cfg! 'installation-name val)] (update-pkg-cfg! 'installation-name val)]
[(list (and key "download-cache-dir") [(list (and key "download-cache-dir")
val) val)
(unless (complete-path? val) (update-pkg-cfg! (string->symbol key) (if (complete-path? val)
(pkg-error (~a "invalid value for config key\n" val
" not an absolute path\n" (path->string
" config key: ~a\n" (path->complete-path val))))]
" given value: ~a")
key
val))
(update-pkg-cfg! (string->symbol key) val)]
[(list (and key (or "download-cache-max-files" [(list (and key (or "download-cache-max-files"
"download-cache-max-bytes")) "download-cache-max-bytes"))
val) val)