[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/15: accounts: Use 'fsync' instead of 'fdatasync'.
From: |
guix-commits |
Subject: |
01/15: accounts: Use 'fsync' instead of 'fdatasync'. |
Date: |
Thu, 27 Jun 2019 05:15:44 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit c25b44d640f709599e3c484a458ae452d99108e1
Author: Ludovic Courtès <address@hidden>
Date: Thu Jun 27 10:39:49 2019 +0200
accounts: Use 'fsync' instead of 'fdatasync'.
* gnu/build/accounts.scm (catch-ENOSYS): Remove.
(database-writer): Use 'fsync' instead of 'fdatasync'.
---
gnu/build/accounts.scm | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/gnu/build/accounts.scm b/gnu/build/accounts.scm
index b901495..5094456 100644
--- a/gnu/build/accounts.scm
+++ b/gnu/build/accounts.scm
@@ -19,7 +19,6 @@
(define-module (gnu build accounts)
#:use-module (guix records)
#:use-module (guix combinators)
- #:use-module ((guix build syscalls) #:select (fdatasync))
#:use-module (gnu system accounts)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-11)
@@ -231,14 +230,6 @@ each field."
;; grab this lock with 'with-file-lock' when they access the databases.
"/etc/.pwd.lock")
-(define-syntax-rule (catch-ENOSYS exp)
- (catch 'system-error
- (lambda () exp)
- (lambda args
- (if (= ENOSYS (system-error-errno args))
- #f
- (apply throw args)))))
-
(define (database-writer file mode entry->string)
(lambda* (entries #:optional (file-or-port file))
"Write ENTRIES to FILE-OR-PORT. When FILE-OR-PORT is a file name, write
@@ -259,10 +250,7 @@ to it atomically and set the appropriate permissions."
(chmod port mode)
(write-entries port)
- ;; XXX: When booting with the statically-linked Guile,
- ;; 'fdatasync' is unavailable.
- (catch-ENOSYS (fdatasync port))
-
+ (fsync port)
(close-port port)
(rename-file template file-or-port))
(lambda ()
- branch master updated (b09e496 -> c30d117), guix-commits, 2019/06/27
- 01/15: accounts: Use 'fsync' instead of 'fdatasync'.,
guix-commits <=
- 03/15: syscalls: Add 'terminal-rows'., guix-commits, 2019/06/27
- 06/15: derivations: Rewrite and replace 'derivations-prerequisites-to-build'., guix-commits, 2019/06/27
- 04/15: ui: Add 'display-search-results' and use it., guix-commits, 2019/06/27
- 02/15: ui: 'relevance' considers regexps connected with a logical and., guix-commits, 2019/06/27
- 11/15: derivations: 'build-derivations' can be passed derivation inputs., guix-commits, 2019/06/27
- 05/15: derivations: Add 'derivation-input'., guix-commits, 2019/06/27
- 15/15: tests: Avoid TCP port collision between lint.scm and guix-daemon.sh., guix-commits, 2019/06/27
- 13/15: ui: 'show-what-to-build' accepts derivation inputs., guix-commits, 2019/06/27
- 09/15: derivations: <derivation-input> now aggregates a <derivation>., guix-commits, 2019/06/27
- 10/15: derivations: 'derivation' preserves pointer equality., guix-commits, 2019/06/27