Re: merge rename and rename-dest-slash
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 9/7/2009 10:30 AM: Any objections to deleting the rename-dest-slash module? It performs a subset of the rename module, Correction. As currently written, rename.m4 checks whether: rm -rf d1 d2 mkdir d1 rename(d1/,d2) fails, but POSIX 2008 permits this case, so the test is wrong. But POSIX _does_ require rm -rf d1 d2 touch d1 rename(d1/,d2) to fail (in other words, the existing code needs to account for whether a directory is being renamed, rather than blindly rejecting trailing slash). Meanwhile, rename-dest-slash.m4 checks whether: rm -rf d1 d2 mkdir d1 rename(d1,d2/) fails, which POSIX 2008 does indeed require to fail. But note: rm -rf d1 d2 mkdir d1 d2 rename(d1,d2/) is required to pass. All of this is independent of the cygwin 1.5 bug, where POSIX requires any rename attempt targeting an explicit . or .. to fail with EINVAL. I guess it's time for me to add a unit test. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqlPvIACgkQ84KuGfSFAYCxZACgsXNKwV8AjPrPTZPN0dfHEeIX gfMAnAx25gaUe73an4YHzI+bi5vaOcVq =BknH -END PGP SIGNATURE-
Re: merge rename and rename-dest-slash
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 9/7/2009 11:12 AM: According to Eric Blake on 9/7/2009 10:30 AM: Any objections to deleting the rename-dest-slash module? It performs a subset of the rename module, Correction. As currently written, rename.m4 checks whether: rm -rf d1 d2 mkdir d1 rename(d1/,d2) Meanwhile, rename-dest-slash.m4 checks whether: rm -rf d1 d2 mkdir d1 rename(d1,d2/) fails And POSIX 2008 is still awkward on rules for trailing slashes. I think the intent is that a directory may be specified with a trailing slash, but that a regular file must not (so, for example, the fact that Solaris 10 allows: touch a rename(a,b/) to succeed if b exists as a regular file, but fails with ENOTDIR if b does not exist, is a bug in Solaris). But I'd rather wait for the Austin group ruling on my bug report: https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=index.tplsource=Llistname=austin-group-lid=12739 as well as delay the merging of these two modules until after coreutils 7.6 is released. I guess it's time for me to add a unit test. Still true, although it's hard to know what to test until we are certain what POSIX requires. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqle4sACgkQ84KuGfSFAYDimACffcikrffznSm+jbGVyNj3/aGA NAsAoKPuryJSyFQcmkXUqRktC8HEkFGt =Zg6u -END PGP SIGNATURE-