Johansen, I was wondering how this code is supposed to work?
cli-complete.ksh:
new_test "pkgsend [EMAIL PROTECTED]"
trans_id=$(pkgsend -s $REPO_URL open [EMAIL PROTECTED],5.11-0)
expect_exit 0 $?
eval $trans_id
pkgsend -s $REPO_URL close
expect_exit 0 $?
new_test "pkgsend rename [EMAIL PROTECTED] [EMAIL PROTECTED]"
pkgsend -s $REPO_URL rename [EMAIL PROTECTED],5.11-0 [EMAIL
PROTECTED],5.11-0
expect_exit 0 $?
What I'm confused about here is that it seems like the "close"
operation closes the transaction, but that the code seems to
continue to use the transaction ID left in the user's environment.
I'm also seeing some tracebacks in the depot when I write
some simple test cases in this department:
def test_rename1(self):
""" Basic rename """
durl = self.dc.get_depot_url()
self.pkgsend(durl, "open [EMAIL PROTECTED]")
self.pkgsend(durl, "close")
self.image_create(durl)
self.pkg("install foo")
self.pkg("verify")
self.pkgsend(durl, "rename [EMAIL PROTECTED] [EMAIL PROTECTED]")
self.pkg("refresh")
self.pkg("image-update")
self.pkg("verify")
Yields a depot log of:
xanadu # cat /tmp/ips.test.14483/depot_logdir/__main__.TestRename.test_rename1
127.0.0.1 - - [21/Feb/2008 21:11:46] "GET / HTTP/1.0" 200 -
127.0.0.1 - - [21/Feb/2008 21:11:46] "GET /open/0/foo%401.0 HTTP/1.1" 200 -
127.0.0.1 - - [21/Feb/2008 21:11:46] "GET
/close/0/1203657106_pkg%3A%2Ffoo%401.0%2C5.11%3A20080221T211146Z HTTP/1.1" 200 -
127.0.0.1 - - [21/Feb/2008 21:11:46] "GET /catalog/0 HTTP/1.1" 200 -
127.0.0.1 - - [21/Feb/2008 21:11:46] "GET /manifest/0/[EMAIL PROTECTED]
HTTP/1.1" 200 -
127.0.0.1 - - [21/Feb/2008 21:11:47] Internal failure:
Traceback (most recent call last):
File "/usr/lib/pkg.depotd", line 397, in do_GET
exec op_call
File "<string>", line 1, in ?
File "/usr/lib/pkg.depotd", line 200, in rename_0
src_fmri = fmri.PkgFmri(rename_dict['Src-FMRI'][0], None)
File "modules/fmri.py", line 49, in __init__
File "modules/version.py", line 164, in __init__
AssertionError
-dp
--
Daniel Price - Solaris Kernel Engineering - [EMAIL PROTECTED] - blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss