** Changes in behavior
+ install -C now dereferences symlink sources when comparing,
+ rather than always treating as different and performing the copy.
+
ls's -f option now simply acts like -aU, instead of also ignoring
some earlier options. For example 'ls -fl' and 'ls -lf' are now
equivalent because -f no longer ignores an earlier -l. The new
return true;
/* compare files using stat */
- if (lstat (src_name, &src_sb) != 0)
+ if (stat (src_name, &src_sb) != 0)
return true;
if (fstatat (dest_dirfd, dest_relname, &dest_sb, AT_SYMLINK_NOFOLLOW) != 0)
ginstall -Cv -m$mode3 a b > out || fail=1
compare out out_installed_second || fail=1
-# files are not regular files
+# non regular files
+ginstall -v -m$mode1 a b > out || fail=1 # reset to regular mode
+compare out out_installed_second || fail=1
+# symlink source is always dereferenced (and so regular here)
+ginstall -v -m$mode1 a d > out || fail=1 # create regular dest
+echo "'a' -> 'd'" > out_installed_first_ad || framework_failure_
+compare out out_installed_first_ad || fail=1
ln -s a c || framework_failure_
-ln -s b d || framework_failure_
+ginstall -Cv -m$mode1 c d > out || fail=1
+compare out out_empty || fail=1
+# symlink dest never created by install so deemed non regular
+ln -nsf b d || framework_failure_
ginstall -Cv -m$mode1 c d > out || fail=1
echo "removed 'd'
'c' -> 'd'" > out_installed_second_cd