~ruther/guix-local

ref: 161094c8e2b46128544b85dae8e97d4fcb2818c0 guix-local/tests/packages.scm -rw-r--r-- 30.5 KiB
161094c8 — Ludovic Courtès 10 years ago
packages: Rewrite 'transitive-inputs' to be linear and remove duplicates.

There were two issues:

  1. Use of 'delete-duplicates', which is quadratic, was a serious problem for
     closures with lots of propagated inputs, such as that of the 'hydra'
     package (several minutes for 'guix build hydra -n'!).

  2. The 'delete-duplicates' call essentially had no effect since duplicate
     inputs typically had a different label and were thus kept.  For
     instance, (bag-transitive-inputs (package->bag inkscape)) would return
     216 items whereas (delete-duplicates (map cdr THAT)) contains only 67
     items.

     The new implementation returns 67 items in this case.  For 'hydra', we're
     down from 42211 items to 361, and roughly 13s for 'guix build hydra'.

* guix/packages.scm (transitive-inputs): Rewrite as a breadth-first
  traversal.  Remove duplicate propagated inputs.
* tests/packages.scm ("package-transitive-inputs", "package->bag, propagated
  inputs"): Adjust to use simple labels for propagated inputs, without "/".
  ("package-transitive-inputs, no duplicates"): New test.
14928016 — Mark H Weaver 10 years ago
Merge branch 'master' into core-updates
86a81222 — 宋文武 10 years ago
Merge branch 'master' into gtk-rebuild

Conflicts:
	gnu/packages/gtk.scm
f77bcbc3 — Eric Bavier 11 years ago
guix: packages: Add package-direct-sources and package-transitive-sources.

* guix/tests.scm (dummy-origin): New syntax.
* guix/packages.scm (package-direct-sources)
  (package-transitive-sources): New procedures.
* tests/packages.scm ("package-direct-sources, no source")
  ("package-direct-sources, #f source")
  ("package-direct-sources, not input source", "package-direct-sources")
  ("package-transitive-sources"): Test them.
4ac0d644 — Andreas Enge 11 years ago
Merge branch 'master' into core-updates.
5cfc17cb — Mark H Weaver 11 years ago
tests: Select appropriate bootstrap guile version for current system.

* tests/packages.scm ("package-source-derivation, snippet"): Select appropriate
  guile-2.0.x.tar.xz tarball based on the value of (%current-system).
bbceb0ef — Ludovic Courtès 11 years ago
packages: Add 'supported-package?'.

* guix/packages.scm (supported-package?): New procedure.
* tests/packages.scm ("supported-package?"): New test.
* build-aux/hydra/gnu-system.scm (package->job): Use it instead of
  'package-transitive-supported-systems'.
334345d9 — Mark H Weaver 11 years ago
Merge branch 'core-updates'
933204e5 — Mark H Weaver 11 years ago
Merge branch 'master' into core-updates

Conflicts:
	gnu-system.am
	gnu/packages/gstreamer.scm
aa46a028 — Ludovic Courtès 11 years ago
profiles: Generalize "hooks" for 'profile-derivation'.

* guix/profiles.scm (info-dir-file): Remove (null? (manifest-entries
  manifest)) test.
  (ca-certificate-bundle): Likewise.
  (ghc-package-cache-file): Turn 'if' into 'and', and remove second
  arm.
  (%default-profile-hooks): New variable.
  (profile-derivation): Remove #:info-dir?, #:ghc-package-cache?, and
  #:ca-certificate-bundle?.  Add #:hooks.  Iterate over HOOKS.  Adjust
  'inputs' accordingly.
* guix/scripts/package.scm (guix-package): Adjust 'profile-derivation'
  call accordingly.
* tests/packages.scm ("--search-paths with pattern"): Likewise.
* tests/profiles.scm ("profile-derivation",
  "profile-derivation, inputs"): Likewise.
9bf3ced0 — Ludovic Courtès 11 years ago
packages: 'package-transitive-supported-systems' accounts for implicit inputs.

Reported by Federico Beffa.

* guix/packages.scm (package-transitive-supported-systems): Use
  bag-direct-inputs + package->bag rather than package-direct-inputs.
* tests/packages.scm ("package-transitive-supported-systems"): Add
  explicit 'build-system' field to each 'dummy-package' form.
  ("package-transitive-supported-systems, implicit inputs"): New test.
ee540857 — Ludovic Courtès 11 years ago
Merge branch 'master' into core-updates
042bc828 — Federico Beffa 11 years ago
profiles: Generate GHC's package database cache.

* guix/profiles.scm (ghc-package-cache-file): New procedure.
  (profile-derivation): Add 'ghc-package-cache?' keyword argument.  If true
  (the default), add the result of 'ghc-package-cache-file' to 'inputs'.
* guix/scripts/package.scm (guix-package)[process-actions]: Pass
  #:ghc-package-cache? to 'profile-generation'.
* tests/packages.scm ("--search-paths with pattern"): Likewise.
* tests/profiles.scm ("profile-derivation"): Likewise.
cf87cc89 — Ludovic Courtès 11 years ago
packages: Rewrite 'patch-and-repack' using gexps.

* guix/packages.scm (patch-and-repack): Remove 'store' parameter and
  change default value of #:inputs to (%standard-patch-inputs).
  [lookup-input, instantiate-patch]: New procedures.
  [patch-inputs]: Remove.
  [builder]: Rename to...
  [build]: ... this.  Use gexps instead of sexps.
  (patch-and-repack*): Remove.
  (origin->derivation): Use 'patch-and-repack' instead of
  'patch-and-repack*'.
* tests/packages.scm ("package-source-derivation,
  snippet")[source](snippet): Remove references to '%build-inputs' and
  '%outputs'.
6d0b9d03 — Ludovic Courtès 11 years ago
tests: Remove dependency on 'glibc-utf8-locales' for profile tests.

This fixes a regression introduced in commit 536c3ee.

* guix/profiles.scm (ca-certificate-bundle): When MANIFEST is empty,
  make a trivial derivation.
* guix/scripts/package.scm (guix-package)[process-actions]: Pass
  #:ca-certificate-bundle? to 'profile-generation'.
* tests/packages.scm ("--search-paths with pattern"): Likewise.
* tests/profiles.scm ("profile-derivation"): Likewise.
93be4e8e — Ludovic Courtès 11 years ago
Merge branch 'master' into core-updates
b69c5c2c — Ludovic Courtès 11 years ago
tests: Skip tests that would fail due to the shebang length.

Reported by Daniel Kochmański <dkochmanski@hellsgate.pl>.
Fixes <http://bugs.gnu.org/19888>.

* guix/tests.scm (shebang-too-long?): New procedure.
* tests/builders.scm ("gnu-build"): Conditionalize on
  not (shebang-too-long?).
* tests/packages.scm ("GNU Make, bootstrap"): Likewise.
* tests/guix-package.sh (shebang_not_too_long): New function.
  Use it to determine whether to build 'gnu-make-boot0'.
12d720fd — Ludovic Courtès 11 years ago
tests: Factorize the network reachability test.

* guix/tests.scm (network-reachable?): New procedure.
* tests/builders.scm (network-reachable?): Remove.
  Replace references to it with calls to the new 'network-reachable?'
  procedure.
* tests/derivations.scm (%coreutils): Use 'network-reachable?' instead
  of 'getaddrinfo'.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise.
862abf8f — Ludovic Courtès 11 years ago
tests: Disable grafts when comparing derivations.

Fixes a regression introduced with the grafting of Patch in 3f11f01.

* tests/packages.scm ("reference to non-existent output"): Wrap in
  'parameterize'.
f304c9c2 — Ludovic Courtès 11 years ago
derivations: Raise an error for references to non-existent outputs.

Fixes <http://bugs.gnu.org/19630>.
Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.

* guix/derivations.scm (&derivation-error,
  &derivation-missing-output-error): New error conditions.
  (derivation->output-path): Raise a '&derivation-missing-output-error'
  if OUTPUT is not an output of DRV.
* guix/ui.scm (call-with-error-handling): Add case for
  'derivation-missing-output-error?'.
  (show-what-to-build): Check whether (derivation-outputs drv) is
  empty.
* tests/packages.scm ("reference to non-existent output"): Add test.
Next