Consolidate update+reader & remove some dead code

This commit is contained in:
a_dinosaur committed 2024-11-22 21:01:01 +11:00
1 parent cc703ad0c5
commit be51934334
7 files changed
+108 -170

No files matched your search

@@ -44,7 +44,7 @@ struct DpkSearchCommand: AsyncParsableCommand {
let localRepositories = try await ApkRepositoriesConfig()
let index: ApkIndex
do {
index = try await ApkIndex.resolve(localRepositories, fetch: .local)
index = try await ApkIndexReader.resolve(localRepositories, fetch: .local)
} catch {
eprint("Failed to build package index: \(error.localizedDescription)")
throw .failure
@@ -19,7 +19,7 @@ struct DpkUpdateCommand: AsyncParsableCommand {
func run() async throws {
let repositories = try await ApkRepositoriesConfig().repositories
eprint("Updating package repositories")
let index = try await ApkIndex.resolve(repositories, fetch: self.lazyDownload ? .lazy : .update)
let index = try await ApkIndexReader.resolve(repositories, fetch: self.lazyDownload ? .lazy : .update)
eprint("Indexed \(index.packages.count) package(s)")
}
}