Danek Duvall wrote:
Saurabh Vyas wrote:
New webrev : http://cr.opensolaris.org/~saurabhv/fix-15646-rev-4/
Thanks a lot for reviewing & providing your valuable comments, please
read more inline..........
publish.py:
- Please be careful not to introduce lines indented by tabs. Use spaces
instead.
Done, shall use 'space' for indenting from now on.
- You appear to have broken timestamp handling -- the "else" on line 412
should be matched to the "for" on line 409, not the "if" on line 407.
- line 418: what does this mean?
Corrected these.
- line 451: You should be able to just error(e, cmd="import"); there's no
sense in duplicating the message already provided by the bundle code.
- line 452, 456: we should probably abandon the transaction in these
cases, too.
- line 455: error(e) here, too -- the default message is good enough, I
think.
Done.
- line 457: Let other EnvironmentErrors get raised, unless you know
specifically what to do with them. "Unknown Error" is not useful in
figuring out what went wrong.
Done, update webrev : http://cr.opensolaris.org/~saurabhv/fix-15646-rev-5/
NOTE : reverted back SolarisPackageDatastreamBundle.py as without the
tey/except for a non existent tar bundle it will throw ValueError
Instead we want the tests for next bundle type to continue in make_bundle().
here are result from the test run after these changes :
v...@opensolaris:~# ls hello/
bar.txt file1 file1.tar foo.txt MyPkg1 MyPkg.pkg
v...@opensolaris:~# pkgsend generate hello/MyPkg1.pkg
unknown path=pkginfo
unknown path=pkgmap
unknown path=install
unknown path=reloc
unknown path=reloc/myttest
unknown path=reloc/mytest/file213
unknown path=reloc/mytest/file110
v...@opensolaris:~# echo $?
0
v...@opensolaris:~# pkgsend generate hello/MyPkg2.pkg
pkgsend: generate: [Errno 2] No such file or directory: 'hello/MyPkg2.pkg'
v...@opensolaris:~# echo $?
1
v...@opensolaris:~# pkgsend generate hello/MyPkg1
v...@opensolaris:~# echo $?
0
v...@opensolaris:~# pkgsend generate hello/MyPkg2
pkgsend: generate: [Errno 2] No such file or directory: 'hello/MyPkg2'
v...@opensolaris:~# echo $?
1
v...@opensolaris:~# pkgsend generate hello/file1.tar
file file1 group=staff mode=0600 owner=vyas path=file1 pkg.size=10485760
timestamp=20100422T072449Z
v...@opensolaris:~# echo $?
0
v...@opensolaris:~# pkgsend generate hello/file2.tar
pkgsend: generate: [Errno 2] No such file or directory: 'hello/file2.tar'
v...@opensolaris:~# echo $?
1
v...@opensolaris:~# pkgsend generate hello/file1
pkgsend: generate: Unknown bundle type for 'hello/file1'
v...@opensolaris:~# echo $?
1
Please let me know if they look good now.
You only added a "doesn't exist" testcase. That should probably be its own
testcase, rather than another item in an existing one. "Something else"
should be added, too.
Added another test case to test "Something else" (used a regular file
with generate).
Please provide your comments on these.
Thanks,
~Saurabh
Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss