Eric Blake wrote:
> For findutils, I recently added a patch to the import-gnulib.sh script to
> call 'find -L -lname '*' -delete' after the fact (yes, this is GNU find
> specific, but does the job of deleting all broken symlinks). But it would
> be better if gnulib-tool and bootstrap were taught to do this instead.
This should fix it for gnulib-tool. (Untested.)
2007-08-26 Bruno Haible <[EMAIL PROTECTED]>
* gnulib-tool (func_import): When deciding which files to remove,
consider also dangling symbolic links.
Reported by Eric Blake.
--- gnulib-tool 26 Aug 2007 10:31:22 -0000 1.253
+++ gnulib-tool 26 Aug 2007 10:34:26 -0000
@@ -2230,7 +2230,7 @@
sed_take_first_column='s,'"$delimiter"'.*,,'
for g in `LC_ALL=C join -t"$delimiter" -v1 "$tmp"/old-files "$tmp"/new-files
| sed -e "$sed_take_first_column"`; do
# Remove the file. Do nothing if the user already removed it.
- if test -f "$destdir/$g"; then
+ if test -f "$destdir/$g" || test -h "$destdir/$g"; then
if $doit; then
echo "Removing file $g (backup in ${g}~)"
mv -f "$destdir/$g" "$destdir/${g}~" || func_fatal_error "failed"