guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: rdup: Fix check phase.


From: Ludovic Courtès
Subject: Re: [PATCH] gnu: rdup: Fix check phase.
Date: Sat, 07 Jun 2014 15:55:55 +0200
User-agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux)

Eric Bavier <address@hidden> skribis:

> This patch should fix the failing rdup build.

Seems to me that the test suite was bound to fail in a chroot setup, no?

> I'm sending it to the list because I wonder if there's a better way to
> handle the missing script shebangs?

[...]

> +                 (alist-cons-before
> +                  'check 'pre-check
> +                  (lambda _
> +                    (setenv "HOME" (getcwd))
> +                    (substitute* 
> "testsuite/rdup/rdup.rdup-up-t-with-file.exp"
> +                       (("/bin/cat") (which "cat")))
> +                    ;; Some test scripts are missing shebangs, which cause
> +                    ;; "could not execute" errors.  Add shebangs.
> +                    (for-each
> +                     (lambda (testscript)
> +                       (with-atomic-file-replacement
> +                        (string-append "testsuite/rdup/" testscript)
> +                        (lambda (in out)
> +                          (begin
> +                            (format out "#!~a\n" (which "sh"))
> +                            (dump-port in out)))))
> +                     '("rdup.hardlink.helper"
> +                       "rdup.hardlink-strip.helper"
> +                       "rdup.hardlink-strip2.helper"
> +                       "rdup.pipeline.helper")))

That looks like the right approach to me.

It would be even nicer to make it a ‘snippet’ in the ‘origin’ structure;
the only difference is that the snippet would use “#!/bin/sh” (that
would later be patched in the patch-shebangs anyway.)  Same for
s,/bin/cat,cat,g.

The advantage is that ‘guix build -S’ would return something equivalent
to what we’re actually building.

Could you try that?

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]