[email protected] wrote:
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.
I didn't know that you wanted to limit it to working within the
refresh_seconds interval of time. I figured we didn't want to do that
since refresh_seconds will eventually come from the repository metadata
instead of being defaulted to four hours.
My personal belief has been that if an implicit refresh (such as that
done by install, image-update, etc.) can't be performed due to network
connectivity issues, then we should not fail or require --no-refresh.
The failure should occur later when we attempt to retrieve a manifest, etc.
Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss