[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
139/182: services: hpcguix-web: Delete lock files during activation.
From: |
guix-commits |
Subject: |
139/182: services: hpcguix-web: Delete lock files during activation. |
Date: |
Fri, 15 Nov 2019 00:01:56 -0500 (EST) |
kkebreau pushed a commit to branch wip-gnome-updates
in repository guix.
commit dc33d5fcfc9f2d69ceb86e47312ec17cf0ca3136
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")
- 121/182: ui: Produce hyperlinks for the 'location' field of search results., (continued)
- 121/182: ui: Produce hyperlinks for the 'location' field of search results., guix-commits, 2019/11/15
- 125/182: gnu: Add homebank., guix-commits, 2019/11/15
- 137/182: gnu: perl-file-configdir: Update to 0.021., guix-commits, 2019/11/15
- 120/182: gnu: botan: Update to 2.12.1., guix-commits, 2019/11/15
- 130/182: gnu: botan: Use getentropy()., guix-commits, 2019/11/15
- 123/182: news: Add Spanish translation., guix-commits, 2019/11/15
- 129/182: gnu: botan: Optimise., guix-commits, 2019/11/15
- 128/182: gnu: miniupnpc: Don't use NAME in source URI., guix-commits, 2019/11/15
- 133/182: gnu: fribidi: Fix CVE-2019-18397., guix-commits, 2019/11/15
- 136/182: gnu: perl-class-inspector: Update to 1.36., guix-commits, 2019/11/15
- 139/182: services: hpcguix-web: Delete lock files during activation.,
guix-commits <=
- 142/182: gnu: make-bootstrap: Memoize GCC variant., guix-commits, 2019/11/15
- 143/182: gnu: make-bootstrap: Slightly clarify 'package-with-relocatable-glibc'., guix-commits, 2019/11/15
- 141/182: services: 'fold-services' memoizes service values., guix-commits, 2019/11/15
- 145/182: gnu: Add matcha-theme., guix-commits, 2019/11/15
- 144/182: doc: Mention value /var to localstatedir option., guix-commits, 2019/11/15
- 146/182: gnu: Add artyfx, guix-commits, 2019/11/15
- 152/182: gnu: gegl: Add source URIs., guix-commits, 2019/11/15
- 151/182: gnu: babl: Update to 0.1.72., guix-commits, 2019/11/15
- 159/182: gnu: cgal: Use HTTPS home page., guix-commits, 2019/11/15
- 157/182: gnu: faad2: Update to 2.8.6., guix-commits, 2019/11/15