* guix/import/texlive.scm (tlpdb): Store "execute" entries.
(tlpdb->package): Add #:CREATE-FORMATS argument when there is an AddFormat
execute action.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, with TeX format"):
("texlive->guix-package, execute but no TeX format"): New tests.
* guix/import/texlive.scm (tlpdb->package): Generate more appropriate source,
home page and license fields when importing meta packages, i.e., TeX Live
collections and schemes.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, meta-package"): New test.
* guix/import/texlive.scm (tlpdb->package): Add TEXLIVE-METAFONT as a native
input whenever font metrics are to be generated.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, with METAFONT files"): New test.
* guix/import/texlive.scm (string->license): Add missing case and try first to
split license strings before giving up.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, multiple licenses"): New test.
* guix/import/texlive.scm (tlpdb): Also register `catalogue' key.
(tlpdb->package): First try to use catalogue for the home-page, then the
name.
* tests/texlive.scm (%fake-tlpdb): Add tests data.
("texlive->guix-package, with catalogue entry, no inputs"): New test.
* guix/import/texlive.scm (tlpdb->package): Generate a package that doesn't
need SIMPLE-TEXLIVE-PACKAGE.
* guix/import/utils.scm (package->definition): Remove special case for
`simple-texlive-package'.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package"): Update test.
("texlive->guix-package, no docfiles"): New test.
Turns out it's easier to read.
* tests/cpan.scm ("cpan->guix-package"): Use a quasiquoted pattern.
* tests/elpa.scm (eval-test-with-elpa): Likewise.
* tests/gem.scm ("gem->guix-package")
("gem->guix-package with a specific version")
("gem-recursive-import")
("gem-recursive-import with a specific version"): Likewise.
* tests/hexpm.scm ("hexpm-recursive-import"): Likewise.
* tests/opam.scm ("opam->guix-package"): Likewise.
* tests/pypi.scm ("pypi->guix-package, no wheel")
("pypi->guix-package, wheels")
("pypi->guix-package, no usable requirement file.")
("pypi->guix-package, package name contains \"-\" followed by digits"):
Likewise.
* tests/texlive.scm ("texlive->guix-package"): Likewise.
The home page for the package had changed.
* tests/texlive.scm ("texlive->guix-package"): Match the home-page and
synopsis inexactly to avoid future similar breakages.
Previously, test cases could fail if some process was listening
at a hard-coded port. This patch eliminates most of these potential
failures, by automatically assigning an unbound port. This should
allow for building multiple guix trees in parallel outside a build
container, though this is currently untested.
The test "home-page: Connection refused" in tests/lint.scm still
hardcodes port 9999, however.
* guix/tests/http.scm
(http-server-can-listen?): remove now unused procedure.
(%http-server-port): default to port 0, meaning the OS
will automatically choose a port.
(open-http-server-socket): remove the false statement claiming
this procedure is exported and also return the allocated port
number.
(%local-url): raise an error if the port is obviously unbound.
(call-with-http-server): set %http-server-port to the allocated
port while the thunk is called.
* tests/derivations.scm: adjust test cases to use automatically
assign a port. As there is no risk of a port conflict now,
do not make any tests conditional upon 'http-server-can-listen?'
anymore.
* tests/elpa.scm: likewise.
* tests/lint.scm: likewise, and add a TODO comment about a port
that is still hard-coded.
* tests/texlive.scm: likewise.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix/import/texlive.scm (fetch-sxml, sxml->package): Export.
* tests/texlive.scm <top level>: Call '%http-server-port'.
("fetch-sxml: returns SXML for valid XML"): Use 'with-http-server' and
set 'current-http-proxy' instead of using 'mock'.
("sxml->package"): Remove use of '@@'.