[zypp-devel] download area at commit
Some background.
- every media opened can have its own mount point.
- before, every soure kept its media opened while the source obj was in memory
- SourceManager had a method that iterates over all living Sources, changing
the attach point of their medias. This was used by pkg bindings.
Now:
- Medias are not used till refresh or commit, they are not part of the source,
and there is not 1:1 repo <-> media access relation.
- There is a function MediaManager::setAttachPrefix(const Pathname) which
changes the prefix for the future opened medias (not the attached ones).
It means:
- as we dont open the medias till commit, and MoveDownloadArea() in bindings
is called just before commit, it should be safe to use just
MediaManager::setAttachPrefix in the MoveDownloadArea() func.
- MoveDownLoad area gets /instdir + /var/tmp as parameter. I am not sure if
MediaManager::setAttachPrefix includes the tmpdir again.
So, if I am correct, all the change needed would be:
#include
Duncan Mac-Vicar Prett wrote: [...]
It means: - as we dont open the medias till commit, and MoveDownloadArea() in bindings is called just before commit, it should be safe to use just
Some files are downloaded before commit (e.g. license), they are downloaded by internal MediaAccess stored in pkg-bindings and assigned to that repository. So I think it's OK. All files downloaded by yast are small so it should be OK to use the ramdisk even later when the target is accessible (so we do not need to change the already existing MediaAccess objects in SourceMoveDownloadArea()).
MediaManager::setAttachPrefix in the MoveDownloadArea() func. - MoveDownLoad area gets /instdir + /var/tmp as parameter. I am not sure if MediaManager::setAttachPrefix includes the tmpdir again.
It should not add any prefix (or suffix) to the passed path, it should use the path as is. -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (2)
-
Duncan Mac-Vicar Prett
-
Ladislav Slezak