[BusyBox] cp -d support
Mark Whitley
markw at lineo.com
Fri Apr 20 20:23:20 UTC 2001
On Fri, Apr 20, 2001 at 12:06:34PM -0700, Matt Kraai wrote:
> On Fri, Apr 20, 2001 at 12:52:09PM -0600, Erik Andersen wrote:
> > On Fri Apr 20, 2001 at 11:40:05AM -0700, Matt Kraai wrote:
> > > I'm rewriting cp. I've pretty much finished, except for the -d
> > > option. Do people actually use this?
[snip]
> > I just use 'cp -a' when I want to do that...
Ditto. I just use cp -a when I need to preserve stuff.
> Since -a reduces to -dpR, I guess I should ask how often -a is
> used.
Good question. My guess is "a lot more often than -d".
> > BTW, are you splitting cp and mv apart?
>
> I plan to. I haven't started on mv though.
Bless you and thank you. Those two have been shacking up for way too long and
it'll be nice to see 'em break up.
You probably already figured this out, but if, durring the course of the
rewrite, you find routines common to both mv and cp that could go into libbb
instead, please do so. TIA.
> Semi-related, you can use the attached script to put your favorite
> cp through its paces (according to SUSv2).
[snip]
> My new implementation passes all of the tests (sound of me patting
> myself on the back (ow, that hurts)). So does GNU's. If any one
> wants to contribute more test cases, please send them to me.
> Especially helpful would be -d and -a ones, since their behavior
> isn't specified in SUSv2.
>
> I'm eventually planning to turn this into a greg testsuite, to
> prevent regressions (like those currently plaguing the Debian
> boot-floppies). Also, it would be really nice if people fixing
> bugs could send in similar testcases to prevent future
> regressions.
BTW, have you looked at the new test stuff that I put in the tests/ directory?
(The key files are 'tester.sh' and 'testcases'.) It's designed to perform
regressions like these. I haven't got any for cp yet, but I'll be happy to add
some.
Mark Whitley
markw at lineo.com
More information about the busybox
mailing list