diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2018-07-03 00:26:59 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2018-07-03 00:39:11 +0200 |
| commit | 3dbf331942f11ee888ccbf849cacdd3a0ab971cd (patch) | |
| tree | e14b075fe4e103288d7536123bcc4c83f1bf1f3a /tests | |
| parent | af2f8ae5f14d272d341148764d256792d8ef06aa (diff) | |
deduplication: Place link files under /gnu/store/.links.
Previously they'd always be placed next to TO-REPLACE, which would lead
to EPERM in some cases.
* guix/store/deduplication.scm (replace-with-link): Add #:swap-directory
parameter and honor it. Add call to 'make-file-writable'. Catch
'system-error' around 'rename-file'.
(deduplicate): Pass #:swap-directory and remove uses of
'false-if-system-error'.
* tests/store-deduplication.scm ("deduplicate"): Add 'chmod' call.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/store-deduplication.scm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/store-deduplication.scm b/tests/store-deduplication.scm index 23617231994..4ca2ec0f61e 100644 --- a/tests/store-deduplication.scm +++ b/tests/store-deduplication.scm | |||
| @@ -47,6 +47,10 @@ | |||
| 47 | (lambda (port) | 47 | (lambda (port) |
| 48 | (put-bytevector port data)))) | 48 | (put-bytevector port data)))) |
| 49 | identical) | 49 | identical) |
| 50 | ;; Make the parent of IDENTICAL read-only. This should not prevent | ||
| 51 | ;; deduplication for inserting its hard link. | ||
| 52 | (chmod (dirname (second identical)) #o544) | ||
| 53 | |||
| 50 | (call-with-output-file unique | 54 | (call-with-output-file unique |
| 51 | (lambda (port) | 55 | (lambda (port) |
| 52 | (put-bytevector port (string->utf8 "This is unique.")))) | 56 | (put-bytevector port (string->utf8 "This is unique.")))) |
