Package Kit: Purposely ignore an error getting package cache

Fixes #15230.

The comment pretty much explains it. I think needing this means this code could
be redesigned, but I don't know enough yet to make that fix.

It also feels like this whole job system and Command pattern is overly
complicated when good old functions would be fine, certainly for pkgman. But
maybe this is used more heavily in HaikuDepot.
This commit is contained in:
Ryan Leavengood 2019-08-09 23:08:03 -04:00
parent 6a23120503
commit f5953f6155

View File

@ -74,11 +74,11 @@ BRefreshRepositoryRequest::CreateInitialJobs()
BRepositoryCache repoCache; BRepositoryCache repoCache;
BPackageRoster roster; BPackageRoster roster;
result = roster.GetRepositoryCache(fRepoConfig.Name(), &repoCache); // We purposely don't check this error, because this may be for a new repo,
if (result != B_OK) { // which doesn't have a cache file yet. The true passed to
delete fetchChecksumJob; // GeneralFileChecksumAccessor below will handle this case, and cause the
return result; // repo data to be fetched and cached for the future in JobSucceeded below.
} roster.GetRepositoryCache(fRepoConfig.Name(), &repoCache);
ValidateChecksumJob* validateChecksumJob ValidateChecksumJob* validateChecksumJob
= new (std::nothrow) ValidateChecksumJob(fContext, = new (std::nothrow) ValidateChecksumJob(fContext,