Opened 5 years ago
Last modified 5 years ago
#15230 closed bug
Unable to add / remove repositories — at Initial Version
Reported by: | kallisti5 | Owned by: | nobody |
---|---|---|---|
Priority: | critical | Milestone: | R1/beta2 |
Component: | Kits/Package Kit | Version: | R1/Development |
Keywords: | pkgman | Cc: | ttcoder |
Blocked By: | Blocking: | ||
Platform: | All |
Description
After https://git.haiku-os.org/haiku/commit/src/kits/package?id=dfbf1c8a0ac59206efcf819b420fbbb5bcf55251, it's not possible to "add repositories" to Haiku.
This is the responsible change:
diff --git a/src/kits/package/RefreshRepositoryRequest.cpp b/src/kits/package/RefreshRepositoryRequest.cpp index 300c1e481e..da23156f9b 100644 --- a/src/kits/package/RefreshRepositoryRequest.cpp +++ b/src/kits/package/RefreshRepositoryRequest.cpp @@ -74,7 +74,11 @@ BRefreshRepositoryRequest::CreateInitialJobs() BRepositoryCache repoCache; BPackageRoster roster; - roster.GetRepositoryCache(fRepoConfig.Name(), &repoCache); + result = roster.GetRepositoryCache(fRepoConfig.Name(), &repoCache); + if (result != B_OK) { + delete fetchChecksumJob; + return result; + } ValidateChecksumJob* validateChecksumJob = new (std::nothrow) ValidateChecksumJob(fContext,
While the error checks in that commit are correct, it seems the functionality of creating repository caches depends on "erroring out loading the cache file"
The ReaderImpl won't create repositories if they are missing. I had a partial fix adding a WriterImpl if the Cache doesn't exist, but a KDL in the network stack killed my git tree and lost my stash data :-(
Note:
See TracTickets
for help on using tickets.