On Wed 04 Nov 2009 at 04:51PM, Brock Pytlik wrote:
> Here's the code which moves the file or download directory from v0 to v1.
> http://cr.opensolaris.org/~bpytlik/ips-12475-v1/
>
> For now I've put it in /usr/lib. If we decide we don't want to deliver
> it at all, that's ok, or if we decide to make it live in /usr/bin/, that
> works too. I haven't written the man page yet because it wasn't clear if
> one would be needed or not.
man page: I'm not sure.
migrate.py: don't need to import getopt (or, you should use getopt
with -d to specify the directory, perhaps)
Please check that argc == 1 and fail if not (i.e. If I ran
migrate.py /tmp /foo as written, it would silently ignore /foo)
Can you copy the exit handler from e.g. pkg(1)? Specifically,
I'd like it to exit 99 if there is a traceback. Especially since
your test code (testutils.py:575) explictly checks for return
values of 99.
Otherwise, looks good.
Testing: Please add a test case or two for the bad forms of input
to the command.
i.e.
assert "/usr/lib/pkg.migrate" -> 2
assert "/usr/lib/pkg.migrate /tmp/somefile" -> 2
assert "/usr/lib/pkg.migrate /foo /bar" -> 2
assert "/usr/lib/pkg.migrate /some/emptydir/" -> ?
assert "/usr/lib/pkg.migrate /already/migrated/dir/" -> 0?
-dp
--
Daniel Price, Solaris Kernel Engineering http://blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss