Dne úterý 10 červenec 2007 21:46 Jan Kupec napsal(a):
Got some more fun for you:
pkg-bindings call:
SourceMoveDownloadArea()
used in inst_rpmcopy for InitialSourceCaching
This is supposed to reattach repo medias into another directory. This is needed by installation to switch from using ram disk to using newly formatted disk for commit. To make it more fun, the reattach needs to happen right before commit (after installation proposal, after confirming to proceed with the installation).
With old libzypp this was done by calling release followed by attach on each media handler of the media set which was associated with Source. Since we don't associate media handler with source anymore, and we use a completely separate MediaSetAccess in repo::PackageProvider, we must find another solution.
Installation needs this *at least for commit* so that the packages are not downloaded into ram disk.
I spoke to duncan already about not creating a new MediaSetAccess for each provideFile in PackageProvider (RepoProvideFile) but passing it instead from target commit. Then, if we can create this MediaSetAccess object with /prefered_attach_point/ parameter set to the new dir, that should be sufficient. Then we would have commit downloading packages into that dir.
If we don't need to specify custom attach point elsewhere, then we're done. If we do, we'll solve it after we'll be finished with this one.
I'm not aware of any other real-life situation in which we could need this. Thanks for looking into this! Jiri -- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 028 959 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz