guix-commits
[Top][All Lists]
Advanced

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

01/04: deduplication: Ignore EMLINK.


From: guix-commits
Subject: 01/04: deduplication: Ignore EMLINK.
Date: Wed, 23 Jan 2019 17:35:20 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit ba5e89be8cfa3428d7b41954df8af792986eb5ee
Author: Ludovic Courtès <address@hidden>
Date:   Wed Jan 23 22:27:29 2019 +0100

    deduplication: Ignore EMLINK.
    
    Until now 'guix offload' would fail (transient failure) upon EMLINK.
    
    * guix/store/deduplication.scm (replace-with-link)
    (deduplicate): Ignore EMLINK.
---
 guix/store/deduplication.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/guix/store/deduplication.scm b/guix/store/deduplication.scm
index a777940..8ca16a4 100644
--- a/guix/store/deduplication.scm
+++ b/guix/store/deduplication.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017 Caleb Ristvedt <address@hidden>
-;;; Copyright © 2018 Ludovic Courtès <address@hidden>
+;;; Copyright © 2018, 2019 Ludovic Courtès <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -109,8 +109,9 @@ Note: TARGET, TO-REPLACE, and SWAP-DIRECTORY must be on the 
same file system."
         (get-temp-link target swap-directory))
       (lambda args
         ;; We get ENOSPC when we can't fit an additional entry in
-        ;; SWAP-DIRECTORY.
-        (if (= ENOSPC (system-error-errno args))
+        ;; SWAP-DIRECTORY.  If it's EMLINK, then TARGET has reached its
+        ;; maximum number of links.
+        (if (memv (system-error-errno args) `(,ENOSPC ,EMLINK))
             #f
             (apply throw args)))))
 
@@ -169,4 +170,8 @@ under STORE."
                          ;; more entries in .links, but that's fine: we can
                          ;; just stop.
                          #f)
+                        ((= errno EMLINK)
+                         ;; PATH has reached the maximum number of links, but
+                         ;; that's OK: we just can't deduplicate it more.
+                         #f)
                         (else (apply throw args))))))))))



reply via email to

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