On Tue, Dec 15, 2009 at 11:22:46AM -0600, Shawn Walker wrote: > > - Using get_remote_opener is the most troublesome way to download > > these actions. This calls get_datastream(), which returns a > > file-object to the caller. You'll be reading the license one URL > > at a time. This code also needs to catch and wrap TransportError, > > as the transport can't catch its own exceptions when the caller is > > performing the read instead of the transport. This approach also > > doesn't retry if there's a failure. > > IMO, it would be easier to use the MFile/get_files() approach that the > > transport currently uses for files and licenses, but just perform > > the license download first. Then you would always have a local > > copy of the license available, unless the download was unable to > > find a copy of the license at any of the hosts. > > So what I was trying to achieve here was avoiding the pre-download > of the license text unless the client actually needed it. In short, > I was intending for it to download the licenses one-by-one on demand > as they were actually needed by the client. > > However, I just realised that the client will have to install of > these license files anyway, so there is likely little point in doing > this since they will have to be downloaded. > > The more I look at it, the more I think I need something like > prefetch_manifests but for actions instead. Do you have any > objections to me just copying what you've done for manifests and > adding that as either prefetch_files or prefetch_actions?
I'm confused why we would prefetch these instead of just downloading them. The needsdata() method for license actions _always_ returns true, meaning that the client will always download all of the licenses during the download phase. Wouldn't it be simpler to split the actions in the packgage plan into licenses and files, and download the licenses seperately first if we need to display any of their content prior to install? -j _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
