Revert "fix: repair NIGHTLY Sparkle quarantine metadata (#1703)" (#1725)

This reverts commit 629b63dfb8.
This commit is contained in:
Austin Wang 2026-03-18 01:56:36 -07:00 committed by GitHub
parent c1543ea49a
commit 2f08e1bee0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 1 additions and 522 deletions

View file

@ -9,8 +9,6 @@ class UpdateDriver: NSObject, SPUUserDriver {
private var pendingCheckTransition: DispatchWorkItem?
private var checkTimeoutWorkItem: DispatchWorkItem?
private var lastFeedURLString: String?
private var updateFileURLForQuarantineRepair: URL?
private var finishedExtractedUpdateQuarantineRepair: Bool = false
init(viewModel: UpdateViewModel, hostBundle _: Bundle) {
self.viewModel = viewModel
@ -120,13 +118,11 @@ class UpdateDriver: NSObject, SPUUserDriver {
func showDownloadDidStartExtractingUpdate() {
UpdateLogStore.shared.append("show extraction started")
setState(.extracting(.init(progress: 0)))
maybeRepairExtractedUpdateQuarantine()
}
func showExtractionReceivedProgress(_ progress: Double) {
UpdateLogStore.shared.append(String(format: "show extraction progress: %.2f", progress))
setState(.extracting(.init(progress: progress)))
maybeRepairExtractedUpdateQuarantine()
}
func showReady(toInstallAndRelaunch reply: @escaping @Sendable (SPUUserUpdateChoice) -> Void) {
@ -258,11 +254,6 @@ class UpdateDriver: NSObject, SPUUserDriver {
UpdateLogStore.shared.append("feed url resolved\(suffix): \(feedURLString)")
}
func prepareQuarantineRepair(for updateFileURL: URL?) {
updateFileURLForQuarantineRepair = updateFileURL
finishedExtractedUpdateQuarantineRepair = false
}
func formatErrorForLog(_ error: Error) -> String {
let nsError = error as NSError
var parts: [String] = ["\(nsError.domain)(\(nsError.code))"]
@ -311,24 +302,6 @@ class UpdateDriver: NSObject, SPUUserDriver {
}
}
private func maybeRepairExtractedUpdateQuarantine() {
guard !finishedExtractedUpdateQuarantineRepair else { return }
do {
let result = try UpdateQuarantineRepair.repairExtractedApplicationIfNeeded(dataURL: updateFileURLForQuarantineRepair)
guard result.outcome != .notFound else { return }
finishedExtractedUpdateQuarantineRepair = true
let path = result.url?.path ?? "<not-found>"
let before = result.beforeRawValue ?? "<none>"
let after = result.afterRawValue ?? "<none>"
UpdateLogStore.shared.append("quarantine repair extracted-app: \(result.outcome) path=\(path) before=\(before) after=\(after)")
} catch {
finishedExtractedUpdateQuarantineRepair = true
UpdateLogStore.shared.append("quarantine repair extracted-app failed: \(error.localizedDescription)")
}
}
private func runOnMain(_ action: @escaping () -> Void) {
if Thread.isMainThread {
action()