diff options
author | Karl Berry <karl@freefriends.org> | 2006-02-14 01:42:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-02-14 01:42:56 +0000 |
commit | fd2afd562945f5a5f69a9394462b01f0fc2e2e91 (patch) | |
tree | 811a4403c8f715167dde2cc480b570997876c55e /Build/tools/Tpm.pm | |
parent | 612f0677c31dd2026dab88bce3079bdab6dda4ca (diff) |
(max_date): take any tpm file, not just
texmf-dist. too many autoupdates.
(fixDate): do RunFiles last, so the tpm date is
only used if nothing else.
git-svn-id: svn://tug.org/texlive/trunk@1523 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/tools/Tpm.pm')
-rw-r--r-- | Build/tools/Tpm.pm | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Build/tools/Tpm.pm b/Build/tools/Tpm.pm index f620b611092..4743558177e 100644 --- a/Build/tools/Tpm.pm +++ b/Build/tools/Tpm.pm @@ -1014,15 +1014,21 @@ sub printdate { return &formatdate(@mytime); } +# if any of FILES are newer than OLDDATE, return the newest mtime. +# sub max_date { my ($olddate, @files) = @_; my ($f, $tpmdate); #print " olddate was " . &formatdate(gmtime($oldate)) . ", files=@files\n"; foreach $f (@files) { - if ($f =~ m@^texmf-dist/tpm/.*\.tpm@) { + # although the texmf/tpm/*.tpm files are mostly hand-maintained, it + # still seems best for the TPM:Date to reflect the newest date of + # the actual files in the package; the sizes and such might still + # get autoupdated. + if ($f =~ m,/tpm/.*\.tpm$,) { $tpmdate = (stat("$MasterDir/$f"))[9]; - #print " tpm itself, found $tpmdate\n"; + #print " tpm itself, found " . &formatdate(gmtime($tpmdate)) . "\n"; } else { my @st = stat("$MasterDir/$f"); @@ -1036,7 +1042,7 @@ sub max_date if ($olddate == 0) { $olddate = $tpmdate; } -# print " newdate is " . &formatdate(gmtime($oldate)) . "\n"; + #print " max_date returning " . &formatdate(gmtime($olddate)) . "\n"; return $olddate; } @@ -1049,14 +1055,17 @@ sub fixDate { } } #print " newdate after bin: " . &formatdate(gmtime($newdate)) . "\n"; - $newdate = &max_date($newdate, $self->getFileList("RunFiles")); - #print " newdate after run: " . &formatdate(gmtime($newdate)) . "\n"; $newdate = &max_date($newdate, $self->getFileList("DocFiles")); #print " newdate after doc: " . &formatdate(gmtime($newdate)) . "\n"; $newdate = &max_date($newdate, $self->getFileList("SourceFiles")); #print " newdate after source: " . &formatdate(gmtime($newdate)) . "\n"; $newdate = &max_date($newdate, $self->getFileList("RemoteFiles")); #print " newdate after remote: " . &formatdate(gmtime($newdate)) . "\n"; + # + # Check the RunFiles last, because it includes the tpm itself, and we + # only want to use that as a last resort. + $rundate = &max_date($newdate, $self->getFileList("RunFiles")); + #print " newdate after run: " . &formatdate(gmtime($newdate)) . "\n"; $self->setAttribute("Date", &formatdate(gmtime($newdate))); } |