summaryrefslogtreecommitdiff
path: root/autogen-catch-race-error.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-14 18:12:43 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-14 18:12:43 +0000
commiteab0df4b6fe601d141abedaac74c8ecefc66935d (patch)
tree4dc63221d5727640917fd5e1d92afef4e15526c1 /autogen-catch-race-error.patch
parent83120fb8e4a64c13d658d819799c73f9c9bbf593 (diff)
automatic import of autogenopeneuler24.03_LTS
Diffstat (limited to 'autogen-catch-race-error.patch')
-rw-r--r--autogen-catch-race-error.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/autogen-catch-race-error.patch b/autogen-catch-race-error.patch
new file mode 100644
index 0000000..be76e2f
--- /dev/null
+++ b/autogen-catch-race-error.patch
@@ -0,0 +1,33 @@
+Origin: https://build.opensuse.org/package/show/openSUSE:Factory/autogen
+Bug: https://bugzilla.opensuse.org/show_bug.cgi?id=1021353
+Forwarded: https://savannah.gnu.org/support/index.php?109234
+Description: This would have made the racy build fail
+ instead of producing missing and incorrect files
+Author: Bernhard Wiedemann <bwiedemann@suse.com>
+
+Index: autogen-5.18.16/agen5/agDep.c
+===================================================================
+--- autogen-5.18.16.orig/agen5/agDep.c
++++ autogen-5.18.16/agen5/agDep.c
+@@ -308,7 +308,7 @@ tidy_dep_file(void)
+ pzn[len] = NUL;
+
+ unlink(pzn);
+- rename(dep_file, pzn);
++ if (rename(dep_file, pzn)) { exit(95); }
+ AGFREE(dep_file);
+ dep_file = pzn;
+ } while (false);
+Index: autogen-5.18.16/agen5/expOutput.c
+===================================================================
+--- autogen-5.18.16.orig/agen5/expOutput.c
++++ autogen-5.18.16/agen5/expOutput.c
+@@ -251,7 +251,7 @@ ag_scm_out_move(SCM new_file)
+
+ if (strcmp(pz, cur_fpstack->stk_fname) != 0) {
+
+- rename(cur_fpstack->stk_fname, pz);
++ if (rename(cur_fpstack->stk_fname, pz)) { exit(94); }
+
+ if (dep_fp != NULL) {
+ rm_target_file(cur_fpstack->stk_fname);