[darcs-users] darcs patch: Fix GNU-ism (cp -a) in tests/repair-corrupt.sh.

Trent W. Buck trentbuck at gmail.com
Wed Dec 24 00:54:25 UTC 2008


Petr Rockai <me at mornfall.net> writes:

> The promised portability fix.

Regarding portability, the reference I use is IEEE Std 1003.1, 2004 Edition,
http://www.opengroup.org/onlinepubs/009695399/

Unfortunately this is only a guide -- for example /bin/sh on SunOS 5.8
doesn't support "export x=y", even though it's mandated by the reference
above.  (Of course, SunOS 5.8 came out before 2004.)

> I'll hope sed -i -e "..." is fine...

sed -i is a GNUism, that is, it requires GNU sed.

> New patches:
>
> [Fix GNU-ism (cp -a) in tests/repair-corrupt.sh.
> Petr Rockai <me at mornfall.net>**20081223172200] hunk ./tests/repair-corrupt.sh 27
>  not darcs check # unapplicable patch!
>
>  # stash away contents of _darcs
> -cp -a _darcs/ _backup_darcs
> +cp -R _darcs/ _backup_darcs

I usually use -r, not -R, but I'm not aware of the portability
implications of either.  That is, I find -r easier to understand.

In this case, I don't think the changed behavior (loss of
--preserve=mode,ownership,timestamps,links and --no-dereference) will
cause problems.



More information about the darcs-users mailing list