BPackageManager: Support pre-added packages

... as needed for the package daemon. _PreparePackageChanges() doesn't
try to clone them in this case.
This commit is contained in:
Ingo Weinhold 2013-09-10 18:59:35 +02:00
parent 36204024cf
commit d3c96ad809

View File

@ -471,10 +471,12 @@ BPackageManager::_PreparePackageChanges(
RemoteRepository* remoteRepository
= dynamic_cast<RemoteRepository*>(package->Repository());
if (remoteRepository == NULL) {
// clone the existing package
_ClonePackageFile(
dynamic_cast<InstalledRepository*>(package->Repository()),
fileName, entry);
// clone the existing package (unless already present)
if (package->Repository() != &installationRepository) {
_ClonePackageFile(
dynamic_cast<InstalledRepository*>(package->Repository()),
fileName, entry);
}
} else {
// download the package
BString url = remoteRepository->Config().PackagesURL();