Hi
Our ltib setup is currently this:
package1/
package2/
ltib/
rpm/
BUILD/
package1 -> ../../../package1
package2 -> ../../../package2
because rpm/BUILD/packageX is a symbolic link, "find" returns
immediately when checking if the source was changed and doesn't
actually check the source. One option is to add a / at the end of the
directory name ("find $src_dir/ ..."). But there could also be
symlinks inside the directory pointing outside tree so I think use
"-L" to follow _all_ symlinks is a better idea (though it can slow
down the check quite a bit if the symlink points to a big directory)
Also, find will search for _all_ the files that are newer than the rpm
but knowing that one file at least changed is enough and checking the
rest is just useless processing. So find should use the "-quit"
parameter to stop the search as soon as one file is found.
Patch attached.
Cheers,
Jehan
diff --git a/ltib b/ltib
index 10134a7..9f66282 100755
--- a/ltib
+++ b/ltib
@@ -904,7 +904,7 @@ TXT
die("'$src_dir' doesn't exist\n") unless -e
$src_dir;
}
# See if the source tree has been touched
- $cmd = "find $src_dir -newer $rpms[0] -print";
+ $cmd = "find -L $src_dir -newer $rpms[0] -print
-quit";
print "checking if sources have been updated: ";
if(`$cmd`) {
print "yes\n";
_______________________________________________
LTIB home page: http://ltib.org
Ltib mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/ltib