[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/10: services: hpcguix-web: Delete lock files during activation.
From: |
guix-commits |
Subject: |
02/10: services: hpcguix-web: Delete lock files during activation. |
Date: |
Sat, 9 Nov 2019 17:06:44 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 7c34c62c807b357b5cdad6fde0f11c9fe93279d0
Author: Ludovic Courtès <address@hidden>
Date: Sat Nov 9 15:12:30 2019 +0100
services: hpcguix-web: Delete lock files during activation.
* gnu/services/web.scm (%hpcguix-web-activation): Delete ".lock" files
from HOME-DIR.
---
gnu/services/web.scm | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index d0c9d0d..3d149a1 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -1049,13 +1049,22 @@ a webserver.")
(define %hpcguix-web-activation
(with-imported-modules '((guix build utils))
#~(begin
- (use-modules (guix build utils))
+ (use-modules (guix build utils)
+ (ice-9 ftw))
(let ((home-dir "/var/cache/guix/web")
(user (getpwnam "hpcguix-web")))
(mkdir-p home-dir)
(chown home-dir (passwd:uid user) (passwd:gid user))
- (chmod home-dir #o755)))))
+ (chmod home-dir #o755)
+
+ ;; Remove stale 'packages.json.lock' file (and other lock files, if
+ ;; any) since that would prevent 'packages.json' from being updated.
+ (for-each (lambda (lock)
+ (delete-file (string-append home-dir "/" lock)))
+ (scandir home-dir
+ (lambda (file)
+ (string-suffix? ".lock" file))))))))
(define %hpcguix-web-log-file
"/var/log/hpcguix-web.log")
- branch master updated (bbfdaaa -> c2cda7d), guix-commits, 2019/11/09
- 01/10: services: hpcguix-web: Explicitly import (guix build utils)., guix-commits, 2019/11/09
- 03/10: tests: Update references to the now-deprecated 'guile-json' variable., guix-commits, 2019/11/09
- 04/10: services: 'fold-services' memoizes service values., guix-commits, 2019/11/09
- 02/10: services: hpcguix-web: Delete lock files during activation.,
guix-commits <=
- 07/10: doc: Mention value /var to localstatedir option., guix-commits, 2019/11/09
- 05/10: gnu: make-bootstrap: Memoize GCC variant., guix-commits, 2019/11/09
- 08/10: gnu: Add matcha-theme., guix-commits, 2019/11/09
- 06/10: gnu: make-bootstrap: Slightly clarify 'package-with-relocatable-glibc'., guix-commits, 2019/11/09
- 10/10: gnu: youtube-dl: Update to 2019.11.05., guix-commits, 2019/11/09
- 09/10: gnu: Add artyfx, guix-commits, 2019/11/09