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