[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] chicken-install: cache local eggs + -location option
From: |
Mario Domenech Goulart |
Subject: |
[PATCH] chicken-install: cache local eggs + -location option |
Date: |
Sun, 12 Feb 2023 00:24:21 +0100 |
Hi,
Please find attached patches to [hopefully] improve the usability of
chicken-install.
The first one
(0001-chicken-install-Cache-eggs-installed-from-local-loca.patch) adds
support for caching eggs whose sources are retrieved from local
locations. With this change, we also get egg versions properly reported
by chicken-status.
This change allows for the seamless use of the git repositories of egg
sources:
* git://code.call-cc.org/eggs-5-all
* git://code.call-cc.org/eggs-5-latest
With this, once the sources of eggs are fetched, it's possible to use
chicken-install without any network access.
Please see the outputs below for the difference in behavior of current
master and master with the attached patch.
###
### Behavior of current master
###
$ ~/local/chicken-master/bin/chicken-install -purge
$ grep '^(location ' ~/local/chicken-master/share/chicken/setup.defaults
(location "/home/mario/src/eggs/eggs-5-latest")
$ ~/local/chicken-master/bin/chicken-install srfi-1
fetching srfi-1
fetching srfi-1
building srfi-1
/home/mario/local/chicken-master/bin/csc -host -D compiling-extension -J
-s -regenerate-import-libraries -setup-mode -I
/home/mario/.cache/chicken-install/srfi-1 -C
-I/home/mario/.cache/chicken-install/srfi-1 -O3 -d0 srfi-1.scm -o
/home/mario/.cache/chicken-install/srfi-1/srfi-1.so
/home/mario/local/chicken-master/bin/csc -regenerate-import-libraries -M
-setup-mode -static -I /home/mario/.cache/chicken-install/srfi-1
-emit-link-file /home/mario/.cache/chicken-install/srfi-1/srfi-1.link -host -D
compiling-extension -c -unit srfi-1 -D compiling-static-extension -C
-I/home/mario/.cache/chicken-install/srfi-1 -O3 -d0 srfi-1.scm -o
/home/mario/.cache/chicken-install/srfi-1/srfi-1.static.o
/home/mario/local/chicken-master/bin/csc -setup-mode -s -host -I
/home/mario/.cache/chicken-install/srfi-1 -C
-I/home/mario/.cache/chicken-install/srfi-1 -O3 -d0 srfi-1.import.scm -o
/home/mario/.cache/chicken-install/srfi-1/srfi-1.import.so
installing srfi-1
$ ~/local/chicken-master/bin/chicken-install srfi-1
fetching srfi-1
building srfi-1
/home/mario/local/chicken-master/bin/csc -host -D compiling-extension -J
-s -regenerate-import-libraries -setup-mode -I
/home/mario/.cache/chicken-install/srfi-1 -C
-I/home/mario/.cache/chicken-install/srfi-1 -O3 -d0 srfi-1.scm -o
/home/mario/.cache/chicken-install/srfi-1/srfi-1.so
/home/mario/local/chicken-master/bin/csc -regenerate-import-libraries -M
-setup-mode -static -I /home/mario/.cache/chicken-install/srfi-1
-emit-link-file /home/mario/.cache/chicken-install/srfi-1/srfi-1.link -host -D
compiling-extension -c -unit srfi-1 -D compiling-static-extension -C
-I/home/mario/.cache/chicken-install/srfi-1 -O3 -d0 srfi-1.scm -o
/home/mario/.cache/chicken-install/srfi-1/srfi-1.static.o
/home/mario/local/chicken-master/bin/csc -setup-mode -s -host -I
/home/mario/.cache/chicken-install/srfi-1 -C
-I/home/mario/.cache/chicken-install/srfi-1 -O3 -d0 srfi-1.import.scm -o
/home/mario/.cache/chicken-install/srfi-1/srfi-1.import.so
installing srfi-1
$ ~/local/chicken-master/bin/chicken-status
srfi-1 .................................................... version: unknown
###
### Behavior with the attached patch
###
$ ~/local/chicken-cache/bin/chicken-install -purge
$ grep '^(location ' ~/local/chicken-cache/share/chicken/setup.defaults
(location "/home/mario/src/eggs/eggs-5-latest")
$ ~/local/chicken-cache/bin/chicken-install srfi-1
fetching srfi-1
building srfi-1
/home/mario/local/chicken-cache/bin/csc -host -D compiling-extension -J -s
-regenerate-import-libraries -setup-mode -I
/home/mario/.cache/chicken-install/srfi-1 -C
-I/home/mario/.cache/chicken-install/srfi-1 -O3 -d0 srfi-1.scm -o
/home/mario/.cache/chicken-install/srfi-1/srfi-1.so
/home/mario/local/chicken-cache/bin/csc -regenerate-import-libraries -M
-setup-mode -static -I /home/mario/.cache/chicken-install/srfi-1
-emit-link-file /home/mario/.cache/chicken-install/srfi-1/srfi-1.link -host -D
compiling-extension -c -unit srfi-1 -D compiling-static-extension -C
-I/home/mario/.cache/chicken-install/srfi-1 -O3 -d0 srfi-1.scm -o
/home/mario/.cache/chicken-install/srfi-1/srfi-1.static.o
/home/mario/local/chicken-cache/bin/csc -setup-mode -s -host -I
/home/mario/.cache/chicken-install/srfi-1 -C
-I/home/mario/.cache/chicken-install/srfi-1 -O3 -d0 srfi-1.import.scm -o
/home/mario/.cache/chicken-install/srfi-1/srfi-1.import.so
installing srfi-1
$ ~/local/chicken-cache/bin/chicken-install srfi-1
building srfi-1
installing srfi-1
$ ~/local/chicken-cache/bin/chicken-status
srfi-1 ...................................................... version: 0.5.1
The second one
(0002-chicken-install-Add-location-command-line-option.patch) adds a
`-location' (short: -l) option to chicken-install, so that users can
conveniently specify a local directory with eggs sources from the
command line, without having to touch setup.defaults.
Example:
$ chicken-install -l ~/src/eggs/eggs-5-latest this
-location takes precedence over the settings in setup.defaults and can
be specified multiple times on the command line. This can be useful,
for example, to install eggs which are not in the official coop.
Example:
$ chicken-install -l ~/src/eggs/eggs-5-latest -l ~/src/my-eggs
my-unofficial-egg
This would install my-unofficial-egg without Internet access even if
it has dependencies on official eggs (also works if it has
dependencies on unnoficial eggs that can be found in ~/src/my-eggs).
All the best.
Mario
--
http://parenteses.org/mario
0001-chicken-install-Cache-eggs-installed-from-local-loca.patch
Description: Text Data
0002-chicken-install-Add-location-command-line-option.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] chicken-install: cache local eggs + -location option,
Mario Domenech Goulart <=