Okay, this is kinda hacky, but it works...
With this patch, if a file is just going to be copied,
ttree just ignores all dependency information...
Perhaps this should be optional... But
I really can't think of *why* a file that is just
going to be copied needs to depend on another file.
Note: non-copy files can still depend on copy files.
Here's the patch:
--- /usr/bin/ttree 2003-12-03 20:30:10.000000000 -0500
+++ /home/dylan/bin/ttree 2003-12-27 00:08:06.000000000 -0500
@@ -284,7 +284,8 @@
my ($dest, $destfile, $filename, $check,
$srctime, $desttime, $mode, $uid, $gid);
my ($old_suffix, $new_suffix);
- my $is_dep = 0;
+ my $is_dep = 0;
+ my $copy_file = 0;
$absfile ||= $file;
$filename = basename($file);
@@ -303,6 +304,15 @@
# print "proc $file => $dest\n";
+
+
+ # check against copy list
+ foreach $check (@$copy) {
+ if ($filename =~ /$check/) {
+ $copy_file = 1;
+ }
+ }
+
# stat the source file unconditionally, so we can preserve
# mode and ownership
(undef, undef, $mode, undef, $uid, $gid, undef, undef, undef, $srctime,
@@ -312,11 +322,11 @@
if (! $all && ! $options{ force } && -f $dest) {
$desttime = ( stat($dest) )[9];
- if (defined $depends) {
+ if (defined $depends and not $copy_file) {
my $deptime = depend_time($file, $depends);
if (defined $deptime && ($srctime < $deptime)) {
$srctime = $deptime;
- $is_dep = 1;
+ $is_dep = 1;
}
}
@@ -328,8 +338,7 @@
}
# check against copy list
- foreach $check (@$copy) {
- if ($filename =~ /$check/) {
+ if ($copy_file) {
printf " > %-32s (copied, matches /$check/)\n", $file
if $verbose;
--
If you pick up a starving dog and make him prosperous, he will not bite you.
This is the principal difference between a dog and a man.
-- Mark Twain, "Pudd'nhead Wilson's Calendar"
-
GPG Fingerprint=D67D 2B75 53C6 9769 30E4 D390 239F C833 F32C F6F6
GPG KeyID=F32CF6F6
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates