On Wed, Jul 08, 2009 at 10:45:20PM -0500, Shawn Walker wrote:
> [email protected] wrote:
>> On Wed, Jul 08, 2009 at 09:15:43PM -0500, Shawn Walker wrote:
>>>> The new webrev is here:
>>>>
>>>> http://cr.opensolaris.org/~johansen/webrev-9929-2/
>>> Overall, looks fine.
>>>
>>> Although, a test case would be nice, I swear we used to have one.
>>
>> I thought we used to have one too.
>>
>> The test I added is slightly more involved:
>>
>> It installs the package, stops the depot, uninstalls the package, and
>> then re-installs the package. This ensures that we can install and
>> uninstall as long as we have manifest on disk and bits in cache.
>
> Woohoo! That's something I've wanted for a while. However, there's a
> catch to this. Remember that it will attempt a catalog refresh if it
> has been more than four hours since the last check (by default), so to
> test the off-line install case (where we already have manifest, and bits
> in cache) you'll have to remove the 'last_refreshed' file from the
> corresponding catalog directory. See t_pkg_list.py lines 314-323.
I'm not sure that I follow. The test case runs in seconds and creates a
new image to perform the operation. I'm never going to hit the four
hour limit, and this is on purpose. The code for the test is literally:
def test_bug_9929(self):
"""Make sure that we can uninstall/install a package that
already has its contents on disk."""
durl = self.dc.get_depot_url()
self.pkgsend_bulk(durl, self.foo11)
self.image_create(durl)
self.pkg("install foo")
self.dc.stop()
self.pkg("uninstall foo")
self.pkg("install foo")
self.dc.start()
I'm just trying to make sure that if we uninstall/reinstall in a short
interval, it will work. I suppose I could add --no-refresh to the
install, but that seems superfluous in this example.
-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss