On 06/14/12 02:16 AM, Brock Pytlik wrote:
On 06/13/12 02:27, Saurabh Vyas wrote:
Hi All,

Please review these trivial fix

CR 7140808 pkgsend traces back on a manifest with a versionless pkg.fmri

webrev :
https://cr.opensolaris.org/action/browse/pkg/saurabhv/7140808-rev0/webrev/



Test run (after additional test case) is successful.

Unit test :
----------
s11u1-b16@/var/tmp# pkgrepo create myrepo

s11u1-b16@/var/tmp# cat manifest
set name=pkg.fmri value=pkg:/test/case1

s11u1-b16@/var/tmp# pkgsend -s myrepo publish manifest
pkgsend publish: Manifest specifies a fmri pkg:/test/case1 without a
version.
Please add the version to the manifest


Thanks,
~Saurabh


Thanks Brock for quick response..

The changes on lines 385-389 don't seem to line up with the bug listed
or any new test cases. Can you please add a test case for that and
explain under what situations that error can happen?

Well if we just have the check like

370                         if pfmri.version:
371                                 pfmri.version.timestr = None

and do not exit (with proper error) we reach

386                 t.open()

which fails with following o/p :

root@S11:/var/tmp# pkgsend -s ./myrepo/ publish manifest
pkgsend: 'open' failed; unable to initiate transaction:
'The specified FMRI, 'pkg:/test/case1', has an invalid version.

and as suggested: exposing "open" to the user seems wrong since that's
no longer an interface.

Thus I thought it would be safe to handle the TransactionOperationError
and not present implementation details.

Is it fine to have this error handling here (or not required ?)

I am not too sure under what condition TransactionOperationError can be
raised by 'open()'. Any suggestion for a test scenarios are most welcome

Thanks,
Saurabh


Thanks,
Brock
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss


--


Saurabh Vyas
Solaris Install Group,
Revenue Product Engineering (RPE), Systems |Bangalore |
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to
developing practices and products that help protect the environment
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to