From c6df09941b9fb225788e9efa276b7aa92e19d3c0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 25 Aug 2014 00:16:49 +0200 Subject: guix-register: By default, attempt to deduplicate registered items. * nix/guix-register/guix-register.cc (GUIX_OPT_DEDUPLICATE): New macro. (options): Add --no-deduplication. (deduplication): New variable. (parse_opt): Handle GUIX_OPT_DEDUPLICATE. (register_validity): Add 'optimize' parameter and honor it. (main): Move 'store' instanatiation after 'settings.nixStore' assignment. * tests/guix-register.sh: Add test for deduplication. * guix/nar.scm (finalize-store-file): Update comment above 'register-path' call. --- guix/nar.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'guix') diff --git a/guix/nar.scm b/guix/nar.scm index 0a7187c2dd..b95cbd648d 100644 --- a/guix/nar.scm +++ b/guix/nar.scm @@ -324,8 +324,7 @@ (define* (finalize-store-file source target (rename-file source target) ;; Register TARGET. As a side effect, it resets the timestamps of all - ;; its files, recursively. However, it doesn't attempt to deduplicate - ;; its files like 'importPaths' does (FIXME). + ;; its files, recursively, and runs a deduplication pass. (register-path target #:references references #:deriver deriver)) -- cgit v1.2.3 From c2815c0f46d16b98559d0498ae683b0e36e25e7a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 25 Aug 2014 10:27:20 +0200 Subject: profiles: Handle packages without a 'share/info' directory. Reported by Mark H. Weaver. * guix/profiles.scm (info-dir-file): Handle the case where 'scandir' returns #f. --- guix/profiles.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/profiles.scm b/guix/profiles.scm index bf86624e43..a2c73fd4cd 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -393,7 +393,7 @@ (define (info-file? file) (define (info-files top) (let ((infodir (string-append top "/share/info"))) (map (cut string-append infodir "/" <>) - (scandir infodir info-file?)))) + (or (scandir infodir info-file?) '())))) (define (install-info info) (zero? -- cgit v1.2.3