[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add support for 'cvs-fetch' method in origins
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] Add support for 'cvs-fetch' method in origins |
Date: |
Tue, 03 Feb 2015 22:11:43 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Mark H Weaver <address@hidden> skribis:
> The motivation for this is libffcall, which hasn't been released in such
> a long time that http://gnu.org/s/libffcall doesn't even link to the
> last release, but just says to download it from CVS.
OK.
> From 118c8b739f368e4e5f691e119618568dcda0e12b Mon Sep 17 00:00:00 2001
> From: Mark H Weaver <address@hidden>
> Date: Sat, 17 Jan 2015 22:11:45 -0500
> Subject: [PATCH] Add support for 'cvs-fetch' method in origins.
>
> * guix/cvs-download.scm, guix/build/cvs.scm: New files.
> * Makefile.am (MODULES): Add them.
[...]
> +(define (find-cvs-directories)
> + (define (enter? path st result)
> + (not (string-suffix? "/CVS" path)))
> + (define (leaf path st result) result)
> + (define (down path st result) result)
> + (define (up path st result) result)
> + (define (skip path st result)
> + (if (and (string-suffix? "/CVS" path)
> + (eqv? 'directory (stat:type st)))
> + (cons path result)
> + result))
> + (define (error path st errno result)
> + (format (current-error-port) "cvs-fetch: ~a: ~a~%"
> + path (strerror errno)))
> + (file-system-fold enter? leaf down up skip error '() "." lstat))
Might be best to sort the result to make it deterministic.
[...]
> +(define-record-type* <cvs-reference>
> + cvs-reference make-cvs-reference
> + cvs-reference?
> + (root-dir cvs-reference-root-dir) ; string
> + (module cvs-reference-module) ; string
> + (revision cvs-reference-revision)) ; string
s/root-dir/root-directory/ maybe?
> + (gexp->derivation (or name "cvs-checkout") build
> + #:system system
> + ;; FIXME: See <https://bugs.gnu.org/18747>.
> + ;;#:local-build? #t
[...]
> + #:local-build? #t)))
To #:local-build? or not to #:local-build?, that is the question. :-)
LGTM modulo these little things.
Thank you,
Ludo’.