Is your feature request related to a problem? Please describe.
Current behaviour of the check introduced by #321 will verify diskspace regardless of if a download (and hence the cache directory size change) takes place. The call as it is right now looks like:
pSolvedPkgInfo->nNeedDownload =
pSolvedPkgInfo->pPkgsToInstall ||
pSolvedPkgInfo->pPkgsToUpgrade ||
pSolvedPkgInfo->pPkgsToDowngrade ||
pSolvedPkgInfo->pPkgsToReinstall;
if (pSolvedPkgInfo->nNeedDownload)
{
dwError = TDNFCheckDownloadCacheBytes(pSolvedPkgInfo, qwAvailCacheBytes);
BAIL_ON_TDNF_ERROR(dwError);
}
As mentioned in this comment #321 (comment):
I am wondering about corner cases:
* if the file is already downloaded to cache, would this check for remaining space even though download isn't needed?
* similar, if we do `tdnf install ./foo-1.2.3.rpm` or `tdnf install file:///some/path/foo-1.2.3.rpm` we don't download, so no need to check for the size. I don't think this is addressed.
One solution may be to move the TDNFCheckDownloadCacheBytes() call to right before libcurl is used to fetch the package from the repository.
Is your feature request related to a problem? Please describe.
Current behaviour of the check introduced by #321 will verify diskspace regardless of if a download (and hence the cache directory size change) takes place. The call as it is right now looks like:
As mentioned in this comment #321 (comment):
One solution may be to move the
TDNFCheckDownloadCacheBytes()call to right before libcurl is used to fetch the package from the repository.