Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9d781b5

Browse files
committed
Remove too-smart-for-its-own-good optimization of not overwriting the output
files when they haven't changed. This confuses make because the build failsto update the file timestamps, and so it keeps on doing the action over again.
1 parentc3a1eae commit9d781b5

File tree

2 files changed

+4
-23
lines changed

2 files changed

+4
-23
lines changed

‎src/backend/catalog/Catalog.pm

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
88
# Portions Copyright (c) 1994, Regents of the University of California
99
#
10-
# $PostgreSQL: pgsql/src/backend/catalog/Catalog.pm,v 1.1 2010/01/0501:06:56 tgl Exp $
10+
# $PostgreSQL: pgsql/src/backend/catalog/Catalog.pm,v 1.2 2010/01/0502:34:03 tgl Exp $
1111
#
1212
#----------------------------------------------------------------------
1313

@@ -169,31 +169,12 @@ sub Catalogs
169169
return \%catalogs;
170170
}
171171

172-
# Rename temporary files to final names, if anything has changed.
172+
# Rename temporary files to final names.
173173
# Call this function with the final file name --- we append .tmp automatically
174174
subRenameTempFile
175175
{
176176
my$final_name =shift;
177177
my$temp_name =$final_name .'.tmp';
178-
if (-e$final_name &&-s$temp_name ==-s$final_name)
179-
{
180-
open TN,'<',"$temp_name" ||die"$temp_name:$!";
181-
if (open FN,'<',$final_name)
182-
{
183-
local$/ =undef;
184-
my$tn = <TN>;
185-
my$fn = <FN>;
186-
close FN;
187-
if ($tneq$fn)
188-
{
189-
print"$final_name unchanged, not replacing\n";
190-
close TN;
191-
unlink($temp_name) ||die"unlink:$temp_name:$!";
192-
return;
193-
}
194-
}
195-
close TN;
196-
}
197178
print"Writing$final_name\n";
198179
rename($temp_name,$final_name) ||die"rename:$temp_name:$!";
199180
}

‎src/backend/catalog/genbki.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
1111
# Portions Copyright (c) 1994, Regents of the University of California
1212
#
13-
# $PostgreSQL: pgsql/src/backend/catalog/genbki.pl,v 1.1 2010/01/0501:06:56 tgl Exp $
13+
# $PostgreSQL: pgsql/src/backend/catalog/genbki.pl,v 1.2 2010/01/0502:34:03 tgl Exp $
1414
#
1515
#----------------------------------------------------------------------
1616

@@ -287,7 +287,7 @@
287287
close SHDESCR;
288288
close SCHEMAPG;
289289

290-
#Rename temp files on top of finalfiles, if they have changed
290+
#Finally, rename the completedfiles into place.
291291
Catalog::RenameTempFile($output_path .'postgres.bki');
292292
Catalog::RenameTempFile($output_path .'postgres.description');
293293
Catalog::RenameTempFile($output_path .'postgres.shdescription');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp