From 4b1786aa2c2e21e5b0c439cf6ad91f157376af5e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 1 Jul 2012 15:37:58 +0200 Subject: Fix `derivation-hash' for outputs not sorted alphabetically. * guix/derivations.scm (derivation-hash): Reorder OUTPUTS. * tests/derivations.scm ("multiple-output derivation, non-alphabetic order"): New test. --- guix/derivations.scm | 3 +++ tests/derivations.scm | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/guix/derivations.scm b/guix/derivations.scm index a2bff44a5f..f85666bcb9 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -293,6 +293,9 @@ in SIZE bytes." (string $out ; echo two > $AAA" + '())) + (drv-path (derivation %store "fixed" (%current-system) + "/bin/sh" `(,builder) + '() + `((,builder)) + #:outputs '("out" "AAA"))) + (succeeded? (build-derivations %store (list drv-path)))) + (and succeeded? + (let ((one (derivation-path->output-path drv-path "out")) + (two (derivation-path->output-path drv-path "AAA"))) + (and (eq? 'one (call-with-input-file one read)) + (eq? 'two (call-with-input-file two read))))))) + (define %coreutils (false-if-exception (nixpkgs-derivation "coreutils"))) -- cgit v1.2.3