Bugzilla – Attachment 165836 Details for
Bug 36730
(Bug 35428 follow-up) po files (sometimes) fail to update
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36730: (Bug 35428 follow-up) po files (sometimes) fail to update
Bug-36730-Bug-35428-follow-up-po-files-sometimes-f.patch (text/plain), 1.68 KB, created by
Janusz Kaczmarek
on 2024-04-30 10:22:05 UTC
(
hide
)
Description:
Bug 36730: (Bug 35428 follow-up) po files (sometimes) fail to update
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2024-04-30 10:22:05 UTC
Size:
1.68 KB
patch
obsolete
>From 075b0c99ac2882db6beac3179afcca0ccd881488 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Tue, 30 Apr 2024 10:18:12 +0000 >Subject: [PATCH] Bug 36730: (Bug 35428 follow-up) po files (sometimes) fail to > update > >Under some circumstances (e.g. non-standard disk latency) po files fail >to be generated. The output from the gulp po:update --lang xx-XX task >is than like this: > >[10:01:39] 'po_update_staff' errored after 6.41 s >[10:01:39] Error: ENOENT: no such file or directory, open '/tmp/koha-5WCc9s/Koha-staff-prog.pot' > >This is due to the time dependencies inside the function flush (callback) >(in the function xgettext) in gulpfile.js. It happens that the >/tmp/koha-NNNNNN folder gets deleted before the asynchronous callback >function called by fs.readFile is completed. The callback should copy >the content of the .pot file from /tmp/koha- to its final destination, >while, in parallel in fact, the folder inside /tmp is being removed. >This creates a race condition. > >Test plan: >========== >Hard to reproduce. But the race condition found in the code should >be obvious. >--- > gulpfile.js | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/gulpfile.js b/gulpfile.js >index 2ff7ff0cf7..7ec5df077f 100644 >--- a/gulpfile.js >+++ b/gulpfile.js >@@ -385,8 +385,8 @@ function xgettext (cmd, filename) { > file.path = path.join(file.base, filename); > file.contents = data; > callback(null, file); >+ fs.rmSync(folder, { recursive: true }); > }); >- fs.rmSync(folder, { recursive: true }); > }); > }); > }) >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36730
:
165836
|
166242