core rebuild

This commit is contained in:
Rmys
2020-12-16 21:20:09 +03:00
parent 348937e0f4
commit 83f1d39eca
7 changed files with 92 additions and 10 deletions
@@ -0,0 +1,44 @@
diff -up texinfo-6.1/install-info/install-info.c.orig texinfo-6.1/install-info/install-info.c
--- texinfo-6.1/install-info/install-info.c.orig 2016-06-22 09:49:38.766013018 +0200
+++ texinfo-6.1/install-info/install-info.c 2016-06-22 14:11:58.673780736 +0200
@@ -973,18 +973,23 @@ output_dirfile (char *dirfile, int dir_n
int n_entries_added = 0;
int i;
FILE *output;
+ char *dirfile_tmp = NULL;
+
+ asprintf (&dirfile_tmp, "%s.tmp", dirfile);
+ if (!dirfile_tmp)
+ xalloc_die ();
if (compression_program)
{
- char *command = concat (compression_program, ">", dirfile);
+ char *command = concat (compression_program, ">", dirfile_tmp);
output = popen (command, "w");
}
else
- output = fopen (dirfile, "w");
+ output = fopen (dirfile_tmp, "w");
if (!output)
{
- perror (dirfile);
+ perror (dirfile_tmp);
exit (EXIT_FAILURE);
}
@@ -1095,6 +1100,13 @@ output_dirfile (char *dirfile, int dir_n
pclose (output);
else
fclose (output);
+
+ if (rename (dirfile_tmp, dirfile) < 0)
+ {
+ perror (dirfile_tmp);
+ exit (EXIT_FAILURE);
+ }
+ free (dirfile_tmp);
}
/* Read through the input LINES, to find the section names and the
+10
View File
@@ -17,6 +17,9 @@
<Dependency>ncurses-devel</Dependency>
<Dependency>perl</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">texinfo-6.1-install-info-use-create-tmp-then-rename-pattern.patch</Patch>
</Patches>
</Source>
<Package>
<Name>texinfo</Name>
@@ -45,6 +48,13 @@
</Package>
<History>
<Update release="8">
<Date>2020-12-09</Date>
<Version>6.7</Version>
<Comment>Rebuild.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="7">
<Date>2019-12-13</Date>
<Version>6.7</Version>