Skip to content

Commit

Permalink
[developermode] Always resolve the developer-mode package before doin…
Browse files Browse the repository at this point in the history
…g an install/remove. Contributes to JB#39097

Otherwise, the install/remove finishes prematurely before packages
are actually downloaded/removed, even if the package ID was
resolved previously.
  • Loading branch information
blammit committed Mar 12, 2018
1 parent e1cc12e commit a7e191c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/developermodesettings.cpp
Expand Up @@ -256,12 +256,10 @@ DeveloperModeSettings::setDeveloperMode(bool enabled)
m_packageKitCommand = &DeveloperModeSettings::removePackage;
}

if (m_developerModePackageId.isEmpty()) {
executePackageKitCommand(&DeveloperModeSettings::resolvePackageId, DEVELOPER_MODE_PACKAGE);
} else {
executePackageKitCommand(m_packageKitCommand, m_developerModePackageId);
m_packageKitCommand = nullptr;
}
// Always resolve the developer-mode package before doing an install/remove, even if it was
// previously resolved; otherwise, the install/remove finishes prematurely before packages
// are actually downloaded/removed.
executePackageKitCommand(&DeveloperModeSettings::resolvePackageId, DEVELOPER_MODE_PACKAGE);
emit workerStatusChanged();
}
}
Expand Down Expand Up @@ -490,6 +488,7 @@ void DeveloperModeSettings::transactionPackage(uint, const QString &packageId)
}

m_developerModePackageId = packageId;

if (!m_developerModeEnabled) {
emit developerModeAvailableChanged();
}
Expand Down

0 comments on commit a7e191c

Please sign in to comment.